@verified-network/verified-sdk 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,14 +7,19 @@ const Security_json_1 = require("../../abi/trades/Security.json");
7
7
  var FUNCTIONS;
8
8
  (function (FUNCTIONS) {
9
9
  FUNCTIONS["GETSETTLEMENTS"] = "getSettlements";
10
+ FUNCTIONS["BALANCE"] = "balanceOf";
10
11
  })(FUNCTIONS || (FUNCTIONS = {}));
11
12
  class SecurityContract extends index_1.VerifiedContract {
12
- constructor(signer) {
13
+ constructor(signer, tokenAddress) {
13
14
  const chainId = signer.provider._network.chainId.toString();
14
- const address = Security_json_1.networks[chainId].address;
15
+ const address = tokenAddress;
15
16
  super(address, JSON.stringify(Security_json_1.abi), signer);
16
17
  this.contractAddress = address;
17
18
  }
19
+ async balanceOf(_wallet, options) {
20
+ await this.validateInput(index_1.DATATYPES.STRING, _wallet);
21
+ return this.callContract(FUNCTIONS.BALANCE, this.sanitiseInput(index_1.DATATYPES.ADDRESS, _wallet), options);
22
+ }
18
23
  /**
19
24
  * Fetches settlement registry for client account.
20
25
  * @param _client account address
@@ -2,36 +2,36 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const contractAddress = {
4
4
  'ropsten': {
5
- 'Client': '0xA3584eac56ef6852D65Da5407ccc9BA41B8d70b4',
6
- 'KYC': '0x6b269E3dcE068574e3f3787E67216054a7AfEF95',
7
- 'System': '0xd2D9F14bee4788Ff32c2878ab01Fd55d16293830',
8
- 'Holder': '0x7a19e06D465cbe6d38590d30af928110d303Ed33',
9
- 'Ledger': '0xF8B381B9680DC940f2328c3442c48502Bf6097bb',
10
- 'Account': '0xA8D57fD37B62AaFaac89f8A5bC778e0150dE4b1A',
11
- 'Factory': '0x24041c70f06f5E46960D357fEEe070Ca0EDBb837',
12
- 'Cash': '0xf3c8eDE0C8b49438FeAC3208DC958B292b75EA7c',
13
- 'Bond': '0x31a6584097d73061F76D15572e3E3696CF4E0740',
14
- 'Token': '0x110D19BFb87309a5173457FAc166F73D1a481B9F',
15
- 'Oracle': '0x164F548C7Cb5be681BB745659b3eF5e99637645E',
16
- 'PreTrade': '0x61B94d09d45CaA35Ab8e16f6CC051B2289F37591',
17
- 'Trade': '0x02D7D0826181EF4d04cf51CE1d57C078A317dd31',
18
- 'PostTrade': '0xB566094dE82737DC9282FD61ba1Ac20ECead8397',
19
- 'SecuritiesRegistry': '0x40814A27685E9CEF474FFCe22523118669bc681d',
20
- 'Security': '0x7Ad3AB2EDc2700c942A33a4Fe4b20486D8c60C2b',
21
- 'OrderPool': '0xA92B7c4066c3D63F75E0Ae045B12E57BDf75EB87',
22
- 'PoolFactory': '0xdaaee82FA0b1f9baa18644082Df080293874eeBd',
23
- 'Products': '0x635f8Ae684090585d2Fa654004DFA4D6dD7Fdd90',
24
- 'Issues': '0x14730A7770203A6FD0BF2fAB56b79798f4C96DbF',
5
+ 'Client': '0x13a3b59852C27191fc58ddd0bec972757b2Fb39E',
6
+ 'KYC': '0x50dFDe849afFb532ea03E36DE74F8aA5D6708215',
7
+ 'System': '0x60504B00CaedC9d560cA3C2A36363D0045B93d8A',
8
+ 'Holder': '0x1EE0ceF2dDDA34AC37595Eae9ca824bE58C33bE6',
9
+ 'Ledger': '0x7f5760446fF456cB620665419d3a8E492BD11199',
10
+ 'Account': '0xE44626F48DA117a788b9E983889d958c53a7168c',
11
+ 'Factory': '0x36f49e8e1D3d713B461D4Cd12f961bC9B784dF67',
12
+ 'Cash': '0x93d5C6B832A9c4FEB1d9897D9b1088124c882eE3',
13
+ 'Bond': '0x04dd0A9405B8DE91f92A0ee5F9972a1E898cFd79',
14
+ 'Token': '0x4ef2b7de40058c71f8718D8c3bB93220Ec077305',
15
+ 'Oracle': '0xf11cB9C121490294be1Db534d0162C390935FBf7',
16
+ 'PreTrade': '0x4688B71Bba4375637D8c86600158bEC876EF3898',
17
+ 'Trade': '0x8200Dec23cbb68824D7b13103E4d54909833622E',
18
+ 'PostTrade': '0x8005253f6B0Cf2365BE58Fc628693F9E1cCb1E40',
19
+ 'SecuritiesRegistry': '0xc090C51D33F556306241e1B915285705C115B68D',
20
+ 'Security': '0x85129845e650bF48B01A0CF76585A4CBEd28a295',
21
+ 'OrderPool': '0x0cFe463C91e7e53e78417a83580f3FDfB3EDD2D2',
22
+ 'PoolFactory': '0xB8Da2b517dC50DE941F7c84bcdFfA9f9e18d628A',
23
+ 'Products': '0x1C243DA5FcF7ad6E93B0360Ea4140ad296E13b57',
24
+ 'Issues': '0x591414688A96Fd75e5D8b7B4ED6D759E08b3b217',
25
25
  'BalancerManager': '',
26
26
  'CASH': {
27
- 'VCUSD': '0xe0609cE74135bF1b0e94EABE3Dbc91349DD3F051',
28
- 'VCEUR': '0x74628cABF33b7e65932Fb3444df55f83f27daabB',
29
- 'VCINR': '0xE829152D2D176ACD7036A67531f747FA64339d71'
27
+ 'VCUSD': '0x56849B0a8108d03926062187b2D97f67465Bb1a6',
28
+ 'VCEUR': '0xB1D0B7a9d2CcD787dedc7f70aE6462062dc84255',
29
+ 'VCINR': '0x4357af1D5823C256Ca1F1A417e2E83D91F25bDDB'
30
30
  },
31
31
  'BOND': {
32
- 'VBUSD': '0xf2A60E81891E4cD29A7686aC22299df2B4Ba1C69',
33
- 'VBEUR': '0x205985d033CdB9dED00C67A9F9313daC79AaE200',
34
- 'VBINR': '0x27C5ED01f11Aec515D37649E04546E0d00212a22'
32
+ 'VBUSD': '0xdF59f85dF09a06c704C5C5fcADe9f15b4Bc06baF',
33
+ 'VBEUR': '0x700BE30446c9DC82C565444ed15EFc5A6696300e',
34
+ 'VBINR': '0xe8Ad6c15Fb44DE7bc5403160279cd0e4CcB0B0A2'
35
35
  }
36
36
  }
37
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",