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.
Files changed (46) hide show
  1. package/README.md +6 -6
  2. package/dist/koinos.js +2986 -4607
  3. package/dist/koinos.min.js +1 -1
  4. package/dist/koinos.min.js.LICENSE.txt +2 -2
  5. package/lib/Contract.d.ts +9 -11
  6. package/lib/Contract.js +20 -20
  7. package/lib/Contract.js.map +1 -1
  8. package/lib/Provider.d.ts +24 -17
  9. package/lib/Provider.js +99 -105
  10. package/lib/Provider.js.map +1 -1
  11. package/lib/Serializer.js +9 -9
  12. package/lib/Serializer.js.map +1 -1
  13. package/lib/Signer.d.ts +9 -9
  14. package/lib/Signer.js +30 -22
  15. package/lib/Signer.js.map +1 -1
  16. package/lib/browser/Contract.d.ts +200 -0
  17. package/lib/browser/Contract.js +298 -0
  18. package/lib/browser/Contract.js.map +1 -0
  19. package/lib/browser/Provider.d.ts +160 -0
  20. package/lib/browser/Provider.js +246 -0
  21. package/lib/browser/Provider.js.map +1 -0
  22. package/lib/browser/Serializer.d.ts +81 -0
  23. package/lib/browser/Serializer.js +169 -0
  24. package/lib/browser/Serializer.js.map +1 -0
  25. package/lib/browser/Signer.d.ts +296 -0
  26. package/lib/browser/Signer.js +429 -0
  27. package/lib/browser/Signer.js.map +1 -0
  28. package/lib/browser/index.d.ts +7 -0
  29. package/lib/browser/index.js +34 -0
  30. package/lib/browser/index.js.map +1 -0
  31. package/lib/browser/index2.d.ts +2 -0
  32. package/lib/browser/index2.js +33 -0
  33. package/lib/browser/index2.js.map +1 -0
  34. package/lib/browser/interface.d.ts +279 -0
  35. package/lib/browser/interface.js +3 -0
  36. package/lib/browser/interface.js.map +1 -0
  37. package/lib/browser/jsonDescriptors/krc20-proto.json +183 -0
  38. package/lib/browser/jsonDescriptors/protocol-proto.json +246 -0
  39. package/lib/browser/utils.d.ts +326 -0
  40. package/lib/browser/utils.js +252 -0
  41. package/lib/browser/utils.js.map +1 -0
  42. package/lib/interface.d.ts +24 -25
  43. package/lib/utils.d.ts +12 -8
  44. package/lib/utils.js +7 -7
  45. package/lib/utils.js.map +1 -1
  46. 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, transactionResponse } = await koin.transfer({
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 blockId = await transactionResponse.wait();
116
- console.log(`Transaction mined. Block id: ${blockId}`);
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 { transactionResponse } = await contract.deploy();
136
+ const { transaction } = await contract.deploy();
137
137
  // wait to be mined
138
- const blockId = await transactionResponse.wait();
139
- console.log(`Contract uploaded in block id ${blockId}`);
138
+ const blockNumber = await transaction.wait();
139
+ console.log(`Contract uploaded in block number ${blockNumber}`);
140
140
  })();
141
141
  ```
142
142