@firmachain/firma-js 0.2.24 → 0.2.25
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.
- package/README.md +19 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,21 +36,27 @@ npm i @firmachain/firma-js
|
|
|
36
36
|
import { FirmaSDK } from "@firmachain/firma-js"
|
|
37
37
|
import { FirmaConfig } from "@firmachain/firma-js"
|
|
38
38
|
|
|
39
|
-
// use preset config
|
|
39
|
+
// use preset config : testnet
|
|
40
40
|
const firma = new FirmaSDK(FirmaConfig.TestNetConfig);
|
|
41
41
|
|
|
42
|
+
// use preset config : mainnet
|
|
43
|
+
const firma = new FirmaSDK(FirmaConfig.MainNetConfig);
|
|
44
|
+
|
|
42
45
|
// or use custom set
|
|
46
|
+
|
|
43
47
|
let chainConfig = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
chainID: "colosseum-1",
|
|
49
|
+
rpcAddress: "https://lcd-mainnet.firmachain.dev:26657",
|
|
50
|
+
restApiAddress: "https://lcd-mainnet.firmachain.dev:1317",
|
|
51
|
+
ipfsNodeAddress: "https://ipfs-dev.firmachain.dev",
|
|
52
|
+
ipfsNodePort: 5001,
|
|
53
|
+
ipfsWebApiAddress: "https://ipfs-dev.firmachain.dev",
|
|
54
|
+
hdPath: "m/44'/7777777'/",
|
|
55
|
+
prefix: "firma",
|
|
56
|
+
denom: "ufct",
|
|
57
|
+
defaultFee: 30000,
|
|
58
|
+
defaultGas: 300000,
|
|
59
|
+
isShowLog: false,
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
const firma = new FirmaSDK(chainConfig);
|
|
@@ -106,7 +112,7 @@ let result = await firma.Bank.send(wallet, address, fctAmount);
|
|
|
106
112
|
### Bank send - extended version
|
|
107
113
|
```js
|
|
108
114
|
const fctAmount = 10;
|
|
109
|
-
let result = await firma.Bank.send(wallet, address, fctAmount, { memo: "", fee:
|
|
115
|
+
let result = await firma.Bank.send(wallet, address, fctAmount, { memo: "", fee: 30000, gas: 300000 });
|
|
110
116
|
```
|
|
111
117
|
|
|
112
118
|
### Calculate gas
|
|
@@ -134,4 +140,4 @@ let result = await firma.Nft.burn(wallet, tokenId);
|
|
|
134
140
|
|
|
135
141
|
You can see everything usage of firma-js on the test folder.
|
|
136
142
|
</br>
|
|
137
|
-
https://github.com/FirmaChain/firma-js/tree/main/test
|
|
143
|
+
https://github.com/FirmaChain/firma-js/tree/main/test
|