npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sygna/bridge-ivms-util

v0.0.8

Published

The IVMS util is an open source library to help you generate the data for interVASP messaging within Sygna Bridge Ecosystem.

Readme

Sygna Bridge IVMS Util For Javascript

Installation

npm install @sygna/bridge-ivms-util

Example

Legacy Version

const ivms = require("@sygna/bridge-ivms-util");

// Originator
// originator name id
const orgNameId = new ivms.legacy.NaturalPersonNameId();
orgNameId.setPrimaryIdentifier("Wu");
orgNameId.setSecondaryIdentifier("Xinli");
orgNameId.setNameIdentifierType(
  ivms.legacy.NaturalPersonNameIdNameIdentifierTypeEnum.LEGL
);

// another name id for originator
const orgNameIdLocal = new ivms.legacy.LocalNaturalPersonNameId();
orgNameIdLocal.setPrimaryIdentifier("吳");
orgNameIdLocal.setSecondaryIdentifier("信利");
orgNameIdLocal.setNameIdentifierType(
  ivms.legacy.LocalNaturalPersonNameIdNameIdentifierTypeEnum.LEGL
);

// assign two name id to originator name
const orgPersonName = new ivms.legacy.NaturalPersonName();
orgPersonName.setNameIdentifiers([orgNameId]);
orgPersonName.setLocalNameIdentifiers([orgNameIdLocal]);

// originator national id and data
const orgPersonNationalId = new ivms.legacy.NationalIdentification();
orgPersonNationalId.setNationalIdentifier("446005");
orgPersonNationalId.setNationalIdentifierType(
  ivms.legacy.NationalIdentificationNationalIdentifierTypeEnum.RAID
);
orgPersonNationalId.setRegistrationAuthority("RA000553");

// assign name, national id, country to originator natural person
const originatingNaturalPerson = new ivms.legacy.NaturalPerson();
originatingNaturalPerson.setName(orgPersonName);
originatingNaturalPerson.setNationalIdentification(orgPersonNationalId);
originatingNaturalPerson.setCountryOfResidence("TZ");

// assign originator to person object
const originatingPerson = new ivms.legacy.Person();
originatingPerson.setNaturalPerson(originatingNaturalPerson);

// assign originator person and account id to originator
const originator = new ivms.legacy.Originator();
originator.setOriginatorPersons([originatingPerson]);
originator.setAccountNumbers(["1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2"]);

// Beneficiary
// beneficiary 1 name id
const bene1NameId = new ivms.legacy.LegalPersonNameId();
bene1NameId.setLegalPersonName("ABC Limited");
bene1NameId.setLegalPersonNameIdentifierType(
  ivms.legacy.LegalPersonNameIdLegalPersonNameIdentifierTypeEnum.LEGL
);

// assign beneficiary 1 name with id
const bene1PersonName = new ivms.legacy.LegalPersonName();
bene1PersonName.setNameIdentifiers([bene1NameId]);

// beneficiary 1 is a legal person
const beneficiary1LegalPerson = new ivms.legacy.LegalPerson();
beneficiary1LegalPerson.setName(bene1PersonName);

// assign beneficiary 1 to person object
const beneficiary1Person = new ivms.legacy.Person();
beneficiary1Person.setLegalPerson(beneficiary1LegalPerson);

// beneficiary 2 name id
const bene2NameId = new ivms.legacy.LegalPersonNameId();
bene2NameId.setLegalPersonName("CBA Trading");
bene2NameId.setLegalPersonNameIdentifierType(
  ivms.legacy.LegalPersonNameIdLegalPersonNameIdentifierTypeEnum.TRAD
);

// assign beneficiary 2 name with id
const bene2PersonName = new ivms.legacy.LegalPersonName();
bene2PersonName.setNameIdentifiers([bene2NameId]);

// beneficiary 2 is a legal person
const beneficiary2LegalPerson = new ivms.legacy.LegalPerson();
beneficiary2LegalPerson.setName(bene2PersonName);

// assign beneficiary 2 to person object
const beneficiary2Person = new ivms.legacy.Person();
beneficiary2Person.setLegalPerson(beneficiary2LegalPerson);

// assign both persons to beneficiary object
const beneficiary = new ivms.legacy.Beneficiary();
beneficiary.setBeneficiaryPersons([beneficiary1Person, beneficiary2Person]);

// assign originator and beneficiary data to identity payload
const privateInfo = new ivms.legacy.IdentityPayload();
privateInfo.setOriginator(originator);
privateInfo.setBeneficiary(beneficiary);

const jsonData = privateInfo.serializeToJson();
console.log(JSON.stringify(jsonData, null, 2));

// decode from json data
const decoded = ivms.legacy.IdentityPayload.deserilizeFromJson(jsonData);
console.log(JSON.stringify(decoded.serializeToJson(), null, 2));

IVMS2023 Version

const ivms = require("@sygna/bridge-ivms-util");

// Originator
// originator name id
const orgNameId = new ivms.ivms2023.NaturalPersonNameId();
orgNameId.setPrimaryIdentifier("Wu");
orgNameId.setSecondaryIdentifier("Xinli");
orgNameId.setNameIdentifierType(
  ivms.ivms2023.NaturalPersonNameIdNameIdentifierTypeEnum.LEGL
);

// another name id for originator
const orgNameIdLocal = new ivms.ivms2023.LocalNaturalPersonNameId();
orgNameIdLocal.setPrimaryIdentifier("吳");
orgNameIdLocal.setSecondaryIdentifier("信利");
orgNameIdLocal.setNameIdentifierType(
  ivms.ivms2023.LocalNaturalPersonNameIdNameIdentifierTypeEnum.LEGL
);

// assign two name id to originator name
const orgPersonName = new ivms.ivms2023.NaturalPersonName();
orgPersonName.setNameIdentifier([orgNameId]);
orgPersonName.setLocalNameIdentifier([orgNameIdLocal]);

// originator national id and data
const orgPersonNationalId = new ivms.ivms2023.NationalIdentification();
orgPersonNationalId.setNationalIdentifier("446005");
orgPersonNationalId.setNationalIdentifierType(
  ivms.ivms2023.NationalIdentificationNationalIdentifierTypeEnum.RAID
);
orgPersonNationalId.setRegistrationAuthority("RA000553");

// assign name, national id, country to originator natural person
const originatingNaturalPerson = new ivms.ivms2023.NaturalPerson();
originatingNaturalPerson.setName(orgPersonName);
originatingNaturalPerson.setNationalIdentification(orgPersonNationalId);
originatingNaturalPerson.setCountryOfResidence("TZ");

// assign originator to person object
const originatingPerson = new ivms.ivms2023.Person();
originatingPerson.setNaturalPerson(originatingNaturalPerson);

// assign originator person to originator
const originator = new ivms.ivms2023.Originator();
originator.setOriginatorPerson([originatingPerson]);

// Beneficiary
// beneficiary 1 name id
const bene1NameId = new ivms.ivms2023.LegalPersonNameId();
bene1NameId.setLegalPersonName("ABC Limited");
bene1NameId.setLegalPersonNameIdentifierType(
  ivms.ivms2023.LegalPersonNameIdLegalPersonNameIdentifierTypeEnum.LEGL
);

// assign beneficiary 1 name with id
const bene1PersonName = new ivms.ivms2023.LegalPersonName();
bene1PersonName.setNameIdentifier([bene1NameId]);

// beneficiary 1 is a legal person
const beneficiary1LegalPerson = new ivms.ivms2023.LegalPerson();
beneficiary1LegalPerson.setName(bene1PersonName);

// assign beneficiary 1 to person object
const beneficiary1Person = new ivms.ivms2023.Person();
beneficiary1Person.setLegalPerson(beneficiary1LegalPerson);

// beneficiary 2 name id
const bene2NameId = new ivms.ivms2023.LegalPersonNameId();
bene2NameId.setLegalPersonName("CBA Trading");
bene2NameId.setLegalPersonNameIdentifierType(
  ivms.ivms2023.LegalPersonNameIdLegalPersonNameIdentifierTypeEnum.TRAD
);

// assign beneficiary 2 name with id
const bene2PersonName = new ivms.ivms2023.LegalPersonName();
bene2PersonName.setNameIdentifier([bene2NameId]);

// beneficiary 2 is a legal person
const beneficiary2LegalPerson = new ivms.ivms2023.LegalPerson();
beneficiary2LegalPerson.setName(bene2PersonName);

// assign beneficiary 2 to person object
const beneficiary2Person = new ivms.ivms2023.Person();
beneficiary2Person.setLegalPerson(beneficiary2LegalPerson);

// assign both persons to beneficiary object
const beneficiary = new ivms.ivms2023.Beneficiary();
beneficiary.setBeneficiaryPerson([beneficiary1Person, beneficiary2Person]);

// serialize originator and beneficiary to JSON
const originatorJson = originator.serializeToJson();
const beneficiaryJson = beneficiary.serializeToJson();

// create payload metadata
const payloadMetadata = new ivms.ivms2023.PayloadMetadata();
payloadMetadata.setPayloadVersion("1.0");

// combine into final payload
const privateInfo = {
  originator: originatorJson,
  beneficiary: beneficiaryJson,
  payloadMetadata: payloadMetadata.serializeToJson()
};

console.log(JSON.stringify(privateInfo, null, 2));

// decode from json data
const decodedOriginator = ivms.ivms2023.Originator.deserilizeFromJson(privateInfo.originator);
const decodedBeneficiary = ivms.ivms2023.Beneficiary.deserilizeFromJson(privateInfo.beneficiary);
console.log(JSON.stringify({
  originator: decodedOriginator.serializeToJson(),
  beneficiary: decodedBeneficiary.serializeToJson()
}, null, 2));