koilib 2.5.0 → 2.7.0
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 +6 -6
- package/dist/koinos.js +2986 -4607
- package/dist/koinos.min.js +1 -1
- package/dist/koinos.min.js.LICENSE.txt +2 -2
- package/lib/Contract.d.ts +9 -11
- package/lib/Contract.js +20 -20
- package/lib/Contract.js.map +1 -1
- package/lib/Provider.d.ts +24 -17
- package/lib/Provider.js +99 -105
- package/lib/Provider.js.map +1 -1
- package/lib/Serializer.js +9 -9
- package/lib/Serializer.js.map +1 -1
- package/lib/Signer.d.ts +9 -9
- package/lib/Signer.js +30 -22
- package/lib/Signer.js.map +1 -1
- package/lib/browser/Contract.d.ts +200 -0
- package/lib/browser/Contract.js +298 -0
- package/lib/browser/Contract.js.map +1 -0
- package/lib/browser/Provider.d.ts +160 -0
- package/lib/browser/Provider.js +246 -0
- package/lib/browser/Provider.js.map +1 -0
- package/lib/browser/Serializer.d.ts +81 -0
- package/lib/browser/Serializer.js +169 -0
- package/lib/browser/Serializer.js.map +1 -0
- package/lib/browser/Signer.d.ts +296 -0
- package/lib/browser/Signer.js +429 -0
- package/lib/browser/Signer.js.map +1 -0
- package/lib/browser/index.d.ts +7 -0
- package/lib/browser/index.js +34 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/index2.d.ts +2 -0
- package/lib/browser/index2.js +33 -0
- package/lib/browser/index2.js.map +1 -0
- package/lib/browser/interface.d.ts +279 -0
- package/lib/browser/interface.js +3 -0
- package/lib/browser/interface.js.map +1 -0
- package/lib/browser/jsonDescriptors/krc20-proto.json +183 -0
- package/lib/browser/jsonDescriptors/protocol-proto.json +246 -0
- package/lib/browser/utils.d.ts +326 -0
- package/lib/browser/utils.js +252 -0
- package/lib/browser/utils.js.map +1 -0
- package/lib/interface.d.ts +24 -25
- package/lib/utils.d.ts +12 -8
- package/lib/utils.js +7 -7
- package/lib/utils.js.map +1 -1
- package/package.json +34 -31
package/README.md
CHANGED
|
@@ -105,15 +105,15 @@ a transaction, and read contracts.
|
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
// Transfer
|
|
108
|
-
const { transaction
|
|
108
|
+
const { transaction } = await koin.transfer({
|
|
109
109
|
to: "172AB1FgCsYrRAW5cwQ8KjadgxofvgPFd6",
|
|
110
110
|
value: "10.0001",
|
|
111
111
|
});
|
|
112
112
|
console.log(`Transaction id ${transaction.id} submitted`);
|
|
113
113
|
|
|
114
114
|
// wait to be mined
|
|
115
|
-
const
|
|
116
|
-
console.log(`Transaction mined. Block
|
|
115
|
+
const blockNumber = await transaction.wait();
|
|
116
|
+
console.log(`Transaction mined. Block number: ${blockNumber}`);
|
|
117
117
|
|
|
118
118
|
// read the balance
|
|
119
119
|
const { result } = await koin.balanceOf(signer.getAddress());
|
|
@@ -133,10 +133,10 @@ It's also possible to upload contracts. First, follow the instructions in [koino
|
|
|
133
133
|
|
|
134
134
|
// create contract and deploy
|
|
135
135
|
const contract = new Contract({ signer, provider, bytecode });
|
|
136
|
-
const {
|
|
136
|
+
const { transaction } = await contract.deploy();
|
|
137
137
|
// wait to be mined
|
|
138
|
-
const
|
|
139
|
-
console.log(`Contract uploaded in block
|
|
138
|
+
const blockNumber = await transaction.wait();
|
|
139
|
+
console.log(`Contract uploaded in block number ${blockNumber}`);
|
|
140
140
|
})();
|
|
141
141
|
```
|
|
142
142
|
|