@ocap/sdk 1.17.6 → 1.17.9
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/index.d.ts +14 -115
- package/package.json +16 -16
package/index.d.ts
CHANGED
|
@@ -332,136 +332,35 @@ export {};
|
|
|
332
332
|
import * as LibMessage from './lib/message';
|
|
333
333
|
declare const _OcapMessage: typeof LibMessage;
|
|
334
334
|
export = _OcapMessage;
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Create an asset address
|
|
338
|
-
*
|
|
339
|
-
* @public
|
|
340
|
-
* @static
|
|
341
|
-
* @param {object} itx - an object of `CreateAssetTx`
|
|
342
|
-
* @returns {string} asset address without `did:abt:` prefix
|
|
343
|
-
*/
|
|
344
|
-
declare function toAssetAddress(itx: any): string;
|
|
345
|
-
/**
|
|
346
|
-
* Create an asset did
|
|
347
|
-
*
|
|
348
|
-
* @public
|
|
349
|
-
* @static
|
|
350
|
-
* @param {object} itx - an object of `CreateAssetTx`
|
|
351
|
-
* @returns {string} asset address without `did:abt:` prefix
|
|
352
|
-
*/
|
|
353
|
-
declare function toAssetDid(itx: any): string;
|
|
335
|
+
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenTx } from '@ocap/types';
|
|
354
336
|
/**
|
|
355
337
|
* Create an itx address
|
|
356
|
-
*
|
|
357
|
-
* @public
|
|
358
|
-
* @static
|
|
359
|
-
* @param {object} itx - an object of forge supported itx
|
|
360
|
-
* @param {string} type - itx type string
|
|
361
|
-
* @param {enum} [role=types.RoleType.ROLE_TX] - role type
|
|
362
|
-
* @returns {string} itx address without `did:abt:` prefix
|
|
363
|
-
*/
|
|
364
|
-
declare function toItxAddress(itx: any, type: string, role?: any): string;
|
|
365
|
-
/**
|
|
366
|
-
* Create an itx did
|
|
367
|
-
*
|
|
368
|
-
* @public
|
|
369
|
-
* @static
|
|
370
|
-
* @param {object} itx - an object of forge supported itx
|
|
371
|
-
* @returns {string} itx address without `did:abt:` prefix
|
|
372
|
-
*/
|
|
373
|
-
declare function toItxDid(itx: any, type: any): string;
|
|
374
|
-
/**
|
|
375
|
-
* Generate an stake address, eg: the did of the stake
|
|
376
|
-
*
|
|
377
|
-
* @public
|
|
378
|
-
* @static
|
|
379
|
-
* @param {string} sender - sender address
|
|
380
|
-
* @param {string} receiver - receiver address
|
|
381
|
-
* @returns {string} stake address without `did:abt:` prefix
|
|
382
|
-
*/
|
|
383
|
-
declare function toStakeAddress(sender: string, receiver: string): string;
|
|
384
|
-
/**
|
|
385
|
-
* Generate an delegate address, eg: the did of the delegation
|
|
386
|
-
*
|
|
387
|
-
* @public
|
|
388
|
-
* @static
|
|
389
|
-
* @param {string} addr1 - delegator address
|
|
390
|
-
* @param {string} addr2 - delegatee address
|
|
391
|
-
* @returns {string} delegation address that can be used to retrieve delegation state
|
|
392
338
|
*/
|
|
393
|
-
declare function
|
|
339
|
+
export declare function toItxAddress(itx: object, type: string, role?: number): string;
|
|
394
340
|
/**
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
* @public
|
|
398
|
-
* @static
|
|
399
|
-
* @param {string} sender - sender address
|
|
400
|
-
* @param {string} receiver - receiver address
|
|
401
|
-
* @returns {string} stake address without `did:abt:` prefix
|
|
341
|
+
* Create an asset address
|
|
402
342
|
*/
|
|
403
|
-
declare function
|
|
343
|
+
export declare function toAssetAddress(itx: Partial<TCreateAssetTx>): string;
|
|
404
344
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
* @public
|
|
408
|
-
* @static
|
|
409
|
-
* @param {string} hash - DepositTetherTx hash
|
|
410
|
-
* @returns {string} stake address without `did:abt:` prefix
|
|
345
|
+
* Create an asset factory address
|
|
411
346
|
*/
|
|
412
|
-
declare function
|
|
347
|
+
export declare function toFactoryAddress(itx: Partial<TCreateFactoryTx>): string;
|
|
413
348
|
/**
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* @public
|
|
417
|
-
* @static
|
|
418
|
-
* @param {string} hash - SetupSwapTx hash
|
|
419
|
-
* @returns {string} swap address without `did:abt:` prefix
|
|
349
|
+
* Create an token address
|
|
420
350
|
*/
|
|
421
|
-
declare function
|
|
351
|
+
export declare function toTokenAddress(itx: Partial<TCreateTokenTx>): string;
|
|
422
352
|
/**
|
|
423
|
-
* Create an
|
|
424
|
-
*
|
|
425
|
-
* @public
|
|
426
|
-
* @static
|
|
427
|
-
* @param {object} itx - an object of `CreateTokenTx`
|
|
428
|
-
* @returns {string} token address without `did:abt:` prefix
|
|
353
|
+
* Create an rollup address
|
|
429
354
|
*/
|
|
430
|
-
declare function
|
|
355
|
+
export declare function toRollupAddress(itx: Partial<TCreateRollupTx>): string;
|
|
431
356
|
/**
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
* @public
|
|
435
|
-
* @static
|
|
436
|
-
* @param {object} itx - an object of `CreateFactoryTx`
|
|
437
|
-
* @returns {string} factory address without `did:abt:` prefix
|
|
357
|
+
* Generate an stake address, eg: the did of the stake
|
|
438
358
|
*/
|
|
439
|
-
declare function
|
|
359
|
+
export declare function toStakeAddress(sender: string, receiver: string): string;
|
|
440
360
|
/**
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
* @public
|
|
444
|
-
* @static
|
|
445
|
-
* @param {object} itx - an object of `CreateRollupTx`
|
|
446
|
-
* @returns {string} rollup address without `did:abt:` prefix
|
|
361
|
+
* Generate an delegate address, eg: the did of the delegation
|
|
447
362
|
*/
|
|
448
|
-
declare function
|
|
449
|
-
declare namespace ForgeSdkUtil {
|
|
450
|
-
export interface T100 {
|
|
451
|
-
toAssetAddress: typeof toAssetAddress;
|
|
452
|
-
toAssetDid: typeof toAssetDid;
|
|
453
|
-
toItxAddress: typeof toItxAddress;
|
|
454
|
-
toItxDid: typeof toItxDid;
|
|
455
|
-
toStakeAddress: typeof toStakeAddress;
|
|
456
|
-
toDelegateAddress: typeof toDelegateAddress;
|
|
457
|
-
toStakeDid: typeof toStakeDid;
|
|
458
|
-
toTetherAddress: typeof toTetherAddress;
|
|
459
|
-
toSwapAddress: typeof toSwapAddress;
|
|
460
|
-
toTokenAddress: typeof toTokenAddress;
|
|
461
|
-
toFactoryAddress: typeof toFactoryAddress;
|
|
462
|
-
toRollupAddress: typeof toRollupAddress;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
363
|
+
export declare function toDelegateAddress(delegator: string, delegatee: string): string;
|
|
465
364
|
|
|
466
365
|
/*~ This declaration specifies that the class constructor function
|
|
467
366
|
*~ is the exported object from the file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/sdk",
|
|
3
3
|
"description": "Forge javascript SDK packages all-in-one",
|
|
4
|
-
"version": "1.17.
|
|
4
|
+
"version": "1.17.9",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-util": "1.17.
|
|
22
|
-
"@ocap/client": "1.17.
|
|
23
|
-
"@ocap/message": "1.17.
|
|
24
|
-
"@ocap/util": "1.17.
|
|
25
|
-
"@ocap/wallet": "1.17.
|
|
26
|
-
"debug": "^4.3.
|
|
27
|
-
"react-app-polyfill": "^1.0.
|
|
21
|
+
"@arcblock/did-util": "1.17.9",
|
|
22
|
+
"@ocap/client": "1.17.9",
|
|
23
|
+
"@ocap/message": "1.17.9",
|
|
24
|
+
"@ocap/util": "1.17.9",
|
|
25
|
+
"@ocap/wallet": "1.17.9",
|
|
26
|
+
"debug": "^4.3.4",
|
|
27
|
+
"react-app-polyfill": "^1.0.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"inspectpack": "^4.
|
|
31
|
-
"jest": "^27.
|
|
30
|
+
"inspectpack": "^4.7.1",
|
|
31
|
+
"jest": "^27.5.1",
|
|
32
32
|
"jsdoc-to-markdown": "^7.1.1",
|
|
33
|
-
"prettier": "^2.
|
|
33
|
+
"prettier": "^2.7.1",
|
|
34
34
|
"remark-cli": "^10.0.1",
|
|
35
|
-
"remark-preset-github": "^4.0.
|
|
36
|
-
"webpack": "^4.
|
|
37
|
-
"webpack-bundle-analyzer": "^3.
|
|
38
|
-
"webpack-cli": "^3.3.
|
|
35
|
+
"remark-preset-github": "^4.0.4",
|
|
36
|
+
"webpack": "^4.46.0",
|
|
37
|
+
"webpack-bundle-analyzer": "^3.9.0",
|
|
38
|
+
"webpack-cli": "^3.3.12"
|
|
39
39
|
},
|
|
40
40
|
"remarkConfig": {
|
|
41
41
|
"plugins": [
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"test": "jest --forceExit --detectOpenHandles",
|
|
80
80
|
"coverage": "yarn test -- --coverage"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "430c739d9f05e3f5dbd4411ee7289f9e7189f6ae"
|
|
83
83
|
}
|