Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 9c1413a

Browse files
author
Gabriel Cardona
committed
Update SLP.Utils.list docs and examples.
1 parent 1cdfe81 commit 9c1413a

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "developer.bitcoin.com",
33
"description": "Bitcoin.com developer resources and documentation",
4-
"version": "3.4.2",
4+
"version": "3.5.0",
55
"author": "Peter <peter@bitcoin.com> and Gabriel Cardona <gabriel@bitcoin.com>",
66
"dependencies": {
77
"badger-components-react": "^0.2.1",

src/data/docs/slp/utils.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

76112
Return all balances for an address

0 commit comments

Comments
 (0)