@@ -10,7 +10,7 @@ List all tokens or list single token by id
1010
1111#### Arguments
1212
13- 1 . id : ` String ` optional. The token id
13+ 1 . id : ` String ` or ` Array ` optional. The token id(s)
1414
1515#### Result
1616
@@ -71,6 +71,42 @@ tokens : `Array` or `Object`. tokens or single token
7171 decimals: 2,
7272 initialTokenQty: 1000000 }
7373
74+ ##### List multiple tokens by tokenIds
75+
76+ (async () => {
77+ try {
78+ let list = await SLP.Utils.list([
79+ "fa6c74c52450fc164e17402a46645ce494a8a8e93b1383fa27460086931ef59f",
80+ "38e97c5d7d3585a2cbf3f9580c82ca33985f9cb0845d4dcce220cb709f9538b0"
81+ ]);
82+ console.log(list);
83+ } catch (error) {
84+ console.error(error);
85+ }
86+ })();
87+
88+ // returns
89+ [{
90+ "id": "fa6c74c52450fc164e17402a46645ce494a8a8e93b1383fa27460086931ef59f",
91+ "timestamp": "2019-02-18 15:47",
92+ "symbol": "SLP",
93+ "name": "Official SLP Token",
94+ "documentUri": "https://simpleledger.cash",
95+ "documentHash": "",
96+ "decimals": 0,
97+ "initialTokenQty": 18446744073709552000
98+ },
99+ {
100+ "id": "38e97c5d7d3585a2cbf3f9580c82ca33985f9cb0845d4dcce220cb709f9538b0",
101+ "timestamp": "2019-02-14 04:11",
102+ "symbol": "PSF",
103+ "name": "Permissionless Software Foundation",
104+ "documentUri": "psfoundation.cash",
105+ "documentHash": "",
106+ "decimals": 8,
107+ "initialTokenQty": 19882.09163133
108+ }]
109+
74110### ` balancesForAddress `
75111
76112Return all balances for an address
0 commit comments