@ocap/sdk 1.6.5 → 1.6.10

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 (4) hide show
  1. package/README.md +5 -6
  2. package/index.d.ts +1015 -735
  3. package/lib/sdk.js +1 -1
  4. package/package.json +22 -21
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
4
4
  [![docs](https://img.shields.io/badge/powered%20by-arcblock-green.svg)](https://docs.arcblock.io)
5
- [![Gitter](https://badges.gitter.im/ArcBlock/community.svg)](https://gitter.im/ArcBlock/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
5
+ [![Gitter](https://badges.gitter.im/ArcBlock/community.svg)](https://gitter.im/ArcBlock/community?utm_source=badge\&utm_medium=badge\&utm_campaign=pr-badge)
6
6
 
7
7
  > Forge Javascript SDK packages all in one
8
8
 
@@ -39,7 +39,7 @@ const OcapSDK = require('@ocap/sdk');
39
39
 
40
40
  // Connect to multi endpoints
41
41
  OcapSDK.connect('https://test.abtnetwork.io/api', { name: 'test' });
42
- OcapSDK.connect('https://zinc.abtnetwork.io/api', { name: 'zinc' });
42
+ OcapSDK.connect('https://beta.abtnetwork.io/api', { name: 'beta' });
43
43
 
44
44
  const sender = OcapSDK.Wallet.fromRandom();
45
45
  const receiver = OcapSDK.Wallet.fromRandom();
@@ -48,15 +48,14 @@ const receiver = OcapSDK.Wallet.fromRandom();
48
48
  await OcapSDK.declare({ moniker: 'sender', wallet: sender }, { conn: 'test' }).then(console.log);
49
49
  await OcapSDK.declare({ moniker: 'receiver', wallet: receiver }, { conn: 'test' }).then(console.log);
50
50
 
51
- // Get zinc chain info
52
- OcapSDK.getChainInfo({ conn: 'zinc' }).then(console.log);
51
+ // Get beta chain info
52
+ OcapSDK.getChainInfo({ conn: 'beta' }).then(console.log);
53
53
 
54
54
  // Get local chain info
55
55
  OcapSDK.getChainInfo({ conn: 'local' }).then(console.log);
56
56
 
57
57
  // Poke and transfer on test chain
58
- await OcapSDK.checkin({ wallet: sender }, { conn: 'test' }).then(console.log);
59
- await OcapSDK.transfer({ to: receiver.toAddress(), token: 1, wallet: sender }, { conn: 'test' }).then(console.log);
58
+ await OcapSDK.transfer({ to: receiver.address, token: 1, wallet: sender }, { conn: 'test' }).then(console.log);
60
59
  ```
61
60
 
62
61
  ### ES6