@waves/node-api-js 1.2.5-beta.8 → 1.2.6
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/cjs/api-node/assets/index.d.ts +12 -0
- package/cjs/api-node/assets/index.js +11 -1
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/create.d.ts +26 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/tools/stringify.js +5 -2
- package/cjs/tools/stringify.js.map +1 -1
- package/cjs/tools/transactions/transactions.d.ts +5 -5
- package/cjs/tools/transactions/transactions.js +11 -3
- package/cjs/tools/transactions/transactions.js.map +1 -1
- package/dist/0.node-api.js +467 -0
- package/dist/node-api.js +30 -7
- package/dist/node-api.min.js +2 -2
- package/dist/node-api.min.js.LICENSE.txt +17 -0
- package/dist/node_fs-node_path.node-api.js +23 -0
- package/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +599 -0
- package/es/api-node/assets/index.d.ts +12 -0
- package/es/api-node/assets/index.js +7 -0
- package/es/api-node/assets/index.js.map +1 -1
- package/es/create.d.ts +26 -1
- package/es/index.d.ts +1 -0
- package/es/index.js.map +1 -1
- package/es/tools/stringify.js +5 -2
- package/es/tools/stringify.js.map +1 -1
- package/es/tools/transactions/transactions.d.ts +5 -5
- package/es/tools/transactions/transactions.js +11 -3
- package/es/tools/transactions/transactions.js.map +1 -1
- package/package.json +3 -3
- package/cjs/tools/adresses/eth2waves.d.ts +0 -1
- package/cjs/tools/adresses/eth2waves.js +0 -38
- package/cjs/tools/adresses/eth2waves.js.map +0 -1
- package/cjs/tools/adresses/ethTxId2waves.d.ts +0 -1
- package/cjs/tools/adresses/ethTxId2waves.js +0 -8
- package/cjs/tools/adresses/ethTxId2waves.js.map +0 -1
- package/cjs/tools/adresses/waves2eth.d.ts +0 -1
- package/cjs/tools/adresses/waves2eth.js +0 -10
- package/cjs/tools/adresses/waves2eth.js.map +0 -1
- package/cjs/tools/assets/convertWaves2Eth.d.ts +0 -1
- package/cjs/tools/assets/convertWaves2Eth.js +0 -10
- package/cjs/tools/assets/convertWaves2Eth.js.map +0 -1
- package/es/tools/adresses/eth2waves.d.ts +0 -1
- package/es/tools/adresses/eth2waves.js +0 -22
- package/es/tools/adresses/eth2waves.js.map +0 -1
- package/es/tools/adresses/ethTxId2waves.d.ts +0 -1
- package/es/tools/adresses/ethTxId2waves.js +0 -5
- package/es/tools/adresses/ethTxId2waves.js.map +0 -1
- package/es/tools/adresses/waves2eth.d.ts +0 -1
- package/es/tools/adresses/waves2eth.js +0 -7
- package/es/tools/adresses/waves2eth.js.map +0 -1
- package/es/tools/assets/convertWaves2Eth.d.ts +0 -1
- package/es/tools/assets/convertWaves2Eth.js +0 -7
- package/es/tools/assets/convertWaves2Eth.js.map +0 -1
|
@@ -18,6 +18,17 @@ export declare function fetchAssetDistribution(base: string, assetId: string, he
|
|
|
18
18
|
* Asset balance distribution
|
|
19
19
|
*/
|
|
20
20
|
export declare function fetchAssetsAddressLimit(base: string, address: string, limit: number, options?: RequestInit): Promise<Array<TAssetDetails>>;
|
|
21
|
+
/**
|
|
22
|
+
* TODO
|
|
23
|
+
* GET assets/nft/${address}/limit/${limit}
|
|
24
|
+
* Asset balance distribution
|
|
25
|
+
*/
|
|
26
|
+
interface IFetchAssetsNftParams {
|
|
27
|
+
address: string;
|
|
28
|
+
limit: number;
|
|
29
|
+
after?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function fetchAssetsNft(base: string, { address, limit, after }: IFetchAssetsNftParams, options?: RequestInit): Promise<Array<TAssetDetails>>;
|
|
21
32
|
export declare function fetchAssetsBalance(base: string, address: string, options?: RequestInit): Promise<TAssetsBalance>;
|
|
22
33
|
export declare function fetchBalanceAddressAssetId(base: string, address: string, assetId: string, options?: RequestInit): Promise<IBalanceAddressAssetId>;
|
|
23
34
|
export interface IAssetDistribution {
|
|
@@ -62,3 +73,4 @@ export declare type TErrorResponse = {
|
|
|
62
73
|
error: number;
|
|
63
74
|
message: string;
|
|
64
75
|
};
|
|
76
|
+
export {};
|
|
@@ -41,6 +41,13 @@ export function fetchAssetDistribution(base, assetId, height, limit, options = O
|
|
|
41
41
|
export function fetchAssetsAddressLimit(base, address, limit, options = Object.create(null)) {
|
|
42
42
|
return request({ base, url: `assets/nft/${address}/limit/${limit}`, options });
|
|
43
43
|
}
|
|
44
|
+
export function fetchAssetsNft(base, { address, limit, after }, options = Object.create(null)) {
|
|
45
|
+
const url = new URL(`assets/nft/${address}/limit/${limit}`, base);
|
|
46
|
+
if (after) {
|
|
47
|
+
url.searchParams.append('after', after);
|
|
48
|
+
}
|
|
49
|
+
return request({ base, url: `${url.pathname}${url.search}`, options });
|
|
50
|
+
}
|
|
44
51
|
export function fetchAssetsBalance(base, address, options = Object.create(null)) {
|
|
45
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
53
|
const balancesResponse = yield request({ base, url: `/assets/balance/${address}`, options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/assets/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAqD,gBAAgB,EAAe,MAAM,iBAAiB,CAAC;AACnH,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAQ1C,MAAM,UAAU,YAAY,CAAmC,IAAY,EAAE,OAAU,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC/H,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAgB;QACjE,IAAI;QACJ,GAAG,EAAE,mBAAmB,EAAE,EAAE;QAC5B,OAAO;KACV,CAAC,CAAC,CAAC;SACC,I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C,UAAU,CAAC,CAAC;YAE3D,IAAI,CAAC,YAAY,EAAE;gBACf,OAAO;aACV;YAED,YAAY,CAAC,gBAAgB,GAAG;gBAC5B,EAAE,EAAE,YAAY,CAAC,mBAAmB;gBACpC,IAAI,EAAE,YAAY,CAAC,IAAI;gBACvB,QAAQ,EAAE,YAAY,CAAC,QAAQ;gBAC/B,WAAW,EAAE,YAAY,CAAC,WAAW;gBACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ;gBAC/B,UAAU,EAAE,YAAY,CAAC,UAAU;gBACnC,MAAM,EAAE,YAAY,CAAC,MAAM;gBAC3B,eAAe,EAAE,YAAY,CAAC,eAAe;gBAC7C,SAAS,EAAE,YAAY,CAAC,cAAc;gBACtC,MAAM,EAAE,YAAY,CAAC,WAAW;gBAChC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;gBAC1C,MAAM,EAAE,EAAE;gBACV,GAAG,EAAE,SAAA,EAAE,EAAI,CAAC,CAAA;gBACZ,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE,gBAAgB,CAAC,KAAK;gBAC5B,OAAO,EAAE,CAAC;aACb,CAAC;QACN,CAAC,CAAC,CAAC;QAEH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;CAAA;AAED,MAAM,UAAU,0BAA0B,CAAC,IAAY,EAAE,OAAe,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjI,OAAO,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,OAAO,IAAI,OAAO,EAAE,EAAE,OAAO,EAAC,CAAC,CAAC;AAClF,CAAC"}
|
package/es/create.d.ts
CHANGED
|
@@ -237,6 +237,11 @@ export declare function create(base: string): {
|
|
|
237
237
|
} & import("@waves/ts-types").WithId & {
|
|
238
238
|
sender: string;
|
|
239
239
|
height: number;
|
|
240
|
+
}) | (import("@waves/ts-types").EthereumTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
241
|
+
version: 1;
|
|
242
|
+
} & import("@waves/ts-types").WithId & {
|
|
243
|
+
sender: string;
|
|
244
|
+
height: number;
|
|
240
245
|
}) | ((import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
241
246
|
version: 1;
|
|
242
247
|
} & import("@waves/ts-types").WithId & {
|
|
@@ -439,6 +444,11 @@ export declare function create(base: string): {
|
|
|
439
444
|
} & import("@waves/ts-types").WithId & {
|
|
440
445
|
sender: string;
|
|
441
446
|
height: number;
|
|
447
|
+
}) | (import("@waves/ts-types").EthereumTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
448
|
+
version: 1;
|
|
449
|
+
} & import("@waves/ts-types").WithId & {
|
|
450
|
+
sender: string;
|
|
451
|
+
height: number;
|
|
442
452
|
}))[], options?: import("./tools/transactions/wait").IWaitOptions | undefined) => Promise<(import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
443
453
|
version: 1;
|
|
444
454
|
} & import("@waves/ts-types").WithId & {
|
|
@@ -641,6 +651,11 @@ export declare function create(base: string): {
|
|
|
641
651
|
} & import("@waves/ts-types").WithId & {
|
|
642
652
|
sender: string;
|
|
643
653
|
height: number;
|
|
654
|
+
}) | (import("@waves/ts-types").EthereumTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
655
|
+
version: 1;
|
|
656
|
+
} & import("@waves/ts-types").WithId & {
|
|
657
|
+
sender: string;
|
|
658
|
+
height: number;
|
|
644
659
|
}) | ((import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
645
660
|
version: 1;
|
|
646
661
|
} & import("@waves/ts-types").WithId & {
|
|
@@ -843,6 +858,11 @@ export declare function create(base: string): {
|
|
|
843
858
|
} & import("@waves/ts-types").WithId & {
|
|
844
859
|
sender: string;
|
|
845
860
|
height: number;
|
|
861
|
+
}) | (import("@waves/ts-types").EthereumTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
862
|
+
version: 1;
|
|
863
|
+
} & import("@waves/ts-types").WithId & {
|
|
864
|
+
sender: string;
|
|
865
|
+
height: number;
|
|
846
866
|
}))[]>;
|
|
847
867
|
};
|
|
848
868
|
blocks: {
|
|
@@ -858,7 +878,7 @@ export declare function create(base: string): {
|
|
|
858
878
|
fee: import("@waves/ts-types").Long;
|
|
859
879
|
}, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").PaymentTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 2>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").IssueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 3>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").IssueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 3>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").IssueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 3> & {
|
|
860
880
|
feeAssetId: string | null;
|
|
861
|
-
}, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").TransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 4>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").TransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 4>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").TransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 4>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").ReissueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 5>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").ReissueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 5>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").ReissueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 5>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").BurnTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 6>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").BurnTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 6>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").BurnTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 6>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").LeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 8>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").LeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 8>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").LeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 8>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").CancelLeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 9>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").CancelLeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 9>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").CancelLeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 9>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").AliasTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 10>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").AliasTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 10>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").AliasTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 10>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").MassTransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 11>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").MassTransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 11>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").DataTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 12>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").DataTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 12>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 13>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 13>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SponsorshipTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 14>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SponsorshipTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 14>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetAssetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 15>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetAssetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 15>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").InvokeScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 16>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").InvokeScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 16>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").UpdateAssetInfoTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 17>, 1> | Transaction<import("@waves/ts-types").Long>[]) => Promise<Record<string, assetsModule.TAssetDetails<import("@waves/ts-types").Long>>>;
|
|
881
|
+
}, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").TransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 4>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").TransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 4>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").TransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 4>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").ReissueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 5>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").ReissueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 5>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").ReissueTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 5>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").BurnTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 6>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").BurnTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 6>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").BurnTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 6>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").LeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 8>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").LeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 8>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").LeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 8>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").CancelLeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 9>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").CancelLeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 9>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").CancelLeaseTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 9>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").AliasTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 10>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").AliasTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 10>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").AliasTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 10>, 3> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").MassTransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 11>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").MassTransferTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 11>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").DataTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 12>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").DataTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 12>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 13>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 13>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SponsorshipTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 14>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SponsorshipTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 14>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetAssetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 15>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").SetAssetScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 15>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").InvokeScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 16>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").InvokeScriptTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 16>, 2> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").UpdateAssetInfoTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 17>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").EthereumTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18>, 1> | Transaction<import("@waves/ts-types").Long>[]) => Promise<Record<string, assetsModule.TAssetDetails<import("@waves/ts-types").Long>>>;
|
|
862
882
|
getAssetIdListByTx: typeof getAssetIdListByTx;
|
|
863
883
|
getTransactionsWithAssets: (address: string, limit: number, after?: string | undefined) => Promise<{
|
|
864
884
|
transactions: ((import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
@@ -1063,6 +1083,11 @@ export declare function create(base: string): {
|
|
|
1063
1083
|
} & import("@waves/ts-types").WithId & {
|
|
1064
1084
|
sender: string;
|
|
1065
1085
|
height: number;
|
|
1086
|
+
}) | (import("@waves/ts-types").EthereumTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
1087
|
+
version: 1;
|
|
1088
|
+
} & import("@waves/ts-types").WithId & {
|
|
1089
|
+
sender: string;
|
|
1090
|
+
height: number;
|
|
1066
1091
|
}))[];
|
|
1067
1092
|
assets: Record<string, assetsModule.TAssetDetails<import("@waves/ts-types").Long>>;
|
|
1068
1093
|
}>;
|
package/es/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ import { create as createFn } from './create';
|
|
|
6
6
|
export { wavesAddress2eth, ethAddress2waves, wavesAsset2Eth, ethTxId2waves };
|
|
7
7
|
export declare const create: typeof createFn;
|
|
8
8
|
export default createFn;
|
|
9
|
+
export { ICallableFuncArgumentType, TCallableFuncArgumentsArray, TCallableFuncArgumentsRecord, TCallableFuncArguments, } from './api-node/addresses';
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAE/D,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAE/D,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,aAAa,EAChB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAE/B,eAAe,QAAQ,CAAC"}
|
package/es/tools/stringify.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
const FIELDS = ['amount', 'matcherFee', 'price', '
|
|
1
|
+
const FIELDS = ['amount', 'matcherFee', 'price', 'minSponsoredAssetFee', 'fee', 'quantity', 'sellMatcherFee', 'buyMatcherFee'];
|
|
2
2
|
export default function (data) {
|
|
3
3
|
return JSON.stringify(data, function (key, value) {
|
|
4
|
-
if (FIELDS.includes(key)) {
|
|
4
|
+
if (FIELDS.includes(key) && value) {
|
|
5
5
|
return `!${value}!`;
|
|
6
6
|
}
|
|
7
7
|
else if (key === 'value' && this['type'] === 'integer') {
|
|
8
8
|
return `!${value}!`;
|
|
9
9
|
}
|
|
10
|
+
else if (key === 'minSponsoredAssetFee' && value == null) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
10
13
|
else {
|
|
11
14
|
return value;
|
|
12
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringify.js","sourceRoot":"","sources":["../../src/tools/stringify.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,GAA4B,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"stringify.js","sourceRoot":"","sources":["../../src/tools/stringify.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,GAA4B,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC;AAExJ,MAAM,CAAC,OAAO,WAA0C,IAAO;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,EAAE,KAAK;QAC5C,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAuB,CAAC,IAAI,KAAK,EAAE;YACnD,OAAO,IAAI,KAAK,GAAG,CAAC;SACvB;aAAM,IAAI,GAAG,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;YACtD,OAAO,IAAI,KAAK,GAAG,CAAC;SACvB;aAAM,IAAI,GAAG,KAAK,sBAAsB,IAAI,KAAK,IAAI,IAAI,EAAE;YACxD,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IWithStateChanges, TPayment, TStateChanges } from "../../api-node/debug";
|
|
2
|
-
import { AssetDecimals, DataTransactionEntry, WithApiMixin } from "@waves/ts-types";
|
|
3
|
-
import { Long } from "@waves/ts-types/
|
|
4
|
-
import { AliasTransaction, BurnTransaction, CancelLeaseTransaction, DataTransaction, ExchangeTransaction, GenesisTransaction, InvokeScriptTransaction, IssueTransaction, LeaseTransaction, MassTransferTransaction, PaymentTransaction, ReissueTransaction, SetAssetScriptTransaction, SetScriptTransaction, SponsorshipTransaction, TransferTransaction, UpdateAssetInfoTransaction } from "@waves/ts-types/
|
|
2
|
+
import { AssetDecimals, DataTransactionEntry, EthereumTransaction, WithApiMixin } from "@waves/ts-types/";
|
|
3
|
+
import { Long } from "@waves/ts-types/";
|
|
4
|
+
import { AliasTransaction, BurnTransaction, CancelLeaseTransaction, DataTransaction, ExchangeTransaction, GenesisTransaction, InvokeScriptTransaction, IssueTransaction, LeaseTransaction, MassTransferTransaction, PaymentTransaction, ReissueTransaction, SetAssetScriptTransaction, SetScriptTransaction, SponsorshipTransaction, TransferTransaction, UpdateAssetInfoTransaction } from "@waves/ts-types/";
|
|
5
5
|
import { IWithApplicationStatus, TLong } from "../../interface";
|
|
6
6
|
export declare type TStateUpdate = {
|
|
7
7
|
data: (DataTransactionEntry & {
|
|
@@ -55,6 +55,6 @@ export declare type TWithStateUpdate = {
|
|
|
55
55
|
stateUpdate: TStateUpdate;
|
|
56
56
|
};
|
|
57
57
|
export declare type TWithState = IWithStateChanges & TWithStateUpdate;
|
|
58
|
-
export declare type TTransaction<LONG = Long> = GenesisTransaction<LONG> | PaymentTransaction<LONG> | IssueTransaction<LONG> | TransferTransaction<LONG> | ReissueTransaction<LONG> | BurnTransaction<LONG> | LeaseTransaction<LONG> | CancelLeaseTransaction<LONG> | AliasTransaction<LONG> | MassTransferTransaction<LONG> | DataTransaction<LONG> | SetScriptTransaction<LONG> | SponsorshipTransaction<LONG> | ExchangeTransaction<LONG> | SetAssetScriptTransaction<LONG> | (InvokeScriptTransaction<LONG> & TWithState) | UpdateAssetInfoTransaction<LONG>;
|
|
58
|
+
export declare type TTransaction<LONG = Long> = GenesisTransaction<LONG> | PaymentTransaction<LONG> | IssueTransaction<LONG> | TransferTransaction<LONG> | ReissueTransaction<LONG> | BurnTransaction<LONG> | LeaseTransaction<LONG> | CancelLeaseTransaction<LONG> | AliasTransaction<LONG> | MassTransferTransaction<LONG> | DataTransaction<LONG> | SetScriptTransaction<LONG> | SponsorshipTransaction<LONG> | ExchangeTransaction<LONG> | SetAssetScriptTransaction<LONG> | (InvokeScriptTransaction<LONG> & TWithState) | UpdateAssetInfoTransaction<LONG> | EthereumTransaction<LONG>;
|
|
59
59
|
export declare function addStateUpdateField(transaction: TTransaction & WithApiMixin & IWithApplicationStatus): TTransaction & WithApiMixin & IWithApplicationStatus;
|
|
60
|
-
export declare function makeStateUpdate(stateChanges: TStateChanges, payment: TPayment[], dApp: string, sender: string): TStateUpdate;
|
|
60
|
+
export declare function makeStateUpdate(stateChanges: TStateChanges, payment: TPayment[], dApp: string | undefined, sender: string): TStateUpdate;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { BigNumber } from "@waves/bignumber";
|
|
2
|
-
import { TRANSACTION_TYPE } from "@waves/ts-types";
|
|
2
|
+
import { TRANSACTION_TYPE } from "@waves/ts-types/";
|
|
3
3
|
export function addStateUpdateField(transaction) {
|
|
4
4
|
if (transaction.type === TRANSACTION_TYPE.INVOKE_SCRIPT && transaction.stateChanges.invokes && transaction.stateChanges.invokes.length) {
|
|
5
|
-
const payments = transaction.payment ? transaction.payment.map(p => ({
|
|
5
|
+
const payments = transaction.payment ? transaction.payment.map((p) => ({
|
|
6
6
|
assetId: p.assetId,
|
|
7
7
|
amount: p.amount
|
|
8
8
|
})) : [];
|
|
9
|
-
|
|
9
|
+
}
|
|
10
|
+
if (transaction.type === TRANSACTION_TYPE.ETHEREUM && transaction.payload.type === 'invocation' && transaction.payload.stateChanges.invokes && transaction.payload.stateChanges.invokes.length) {
|
|
11
|
+
const payments = transaction.payload.payment ? transaction.payload.payment.map((p) => ({
|
|
12
|
+
assetId: p.assetId,
|
|
13
|
+
amount: p.amount
|
|
14
|
+
})) : [];
|
|
15
|
+
const dApp = transaction.payload.dApp || '';
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
return Object.defineProperty(transaction, 'stateUpdate', { get: () => makeStateUpdate(transaction.payload.stateChanges, payments, dApp, transaction.sender) });
|
|
10
18
|
}
|
|
11
19
|
else
|
|
12
20
|
return transaction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/tools/transactions/transactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/tools/transactions/transactions.ts"],"names":[],"mappings":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|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@types/node-fetch": "^2.5.4",
|
|
14
14
|
"@waves/bignumber": "^1.1.1",
|
|
15
|
-
"@waves/ts-types": "^1.0.
|
|
16
|
-
"node-fetch": "^2.6.
|
|
15
|
+
"@waves/ts-types": "^1.0.9",
|
|
16
|
+
"node-fetch": "^2.6.7",
|
|
17
17
|
"typed-ts-events": "^1.1.1"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function eth2waves(ethAddress: string, chainId: number): string;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __spread = (this && this.__spread) || function () {
|
|
19
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
20
|
-
return ar;
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
var ts_lib_crypto_1 = require("@waves/ts-lib-crypto");
|
|
24
|
-
function eth2waves(ethAddress, chainId) {
|
|
25
|
-
var prefixBytes = new Uint8Array([0x01, chainId]);
|
|
26
|
-
// Раскодировать HEX строку в байты (PK_HASH)
|
|
27
|
-
var pkHashBytes = ts_lib_crypto_1.base16Decode(ethAddress);
|
|
28
|
-
// Сделать чексумму CHECKSUM=keccak256(blake2b256([0x01, CHAIN_ID] + PK_HASH))
|
|
29
|
-
var checksumBytes = new Uint8Array(__spread(prefixBytes, pkHashBytes));
|
|
30
|
-
var checksum = ts_lib_crypto_1.keccak(ts_lib_crypto_1.blake2b(checksumBytes));
|
|
31
|
-
// склеить [0x01, CHAIN_ID] (два байта) + PK_HASH (изначальные 20 байт) + CHECKSUM[1:4] (первые четыре байта чексуммы)
|
|
32
|
-
var wavesBytes = new Uint8Array(__spread(prefixBytes, pkHashBytes.slice(0, 20), checksum.slice(0, 4)));
|
|
33
|
-
// закодировать в base58
|
|
34
|
-
var wavesAddress = ts_lib_crypto_1.base58Encode(wavesBytes);
|
|
35
|
-
return wavesAddress;
|
|
36
|
-
}
|
|
37
|
-
exports.default = eth2waves;
|
|
38
|
-
//# sourceMappingURL=ethAddress2waves.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eth2waves.js","sourceRoot":"","sources":["../../../src/tools/adresses/eth2waves.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAkF;AAElF,SAAwB,SAAS,CAAC,UAAkB,EAAE,OAAe;IACjE,IAAM,WAAW,GAAG,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpD,6CAA6C;IAC7C,IAAM,WAAW,GAAG,4BAAY,CAAC,UAAU,CAAC,CAAC;IAE7C,8EAA8E;IAC9E,IAAM,aAAa,GAAG,IAAI,UAAU,UAC7B,WAAW,EACX,WAAW,EAChB,CAAC;IACH,IAAM,QAAQ,GAAG,sBAAM,CAAC,uBAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAEhD,sHAAsH;IACtH,IAAM,UAAU,GAAG,IAAI,UAAU,UAC1B,WAAW,EACX,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EACxB,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EACzB,CAAC;IAEH,wBAAwB;IACxB,IAAM,YAAY,GAAG,4BAAY,CAAC,UAAU,CAAC,CAAC;IAE9C,OAAO,YAAY,CAAC;AACxB,CAAC;AAxBD,4BAwBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function ethTxId2waves(ethTxId: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ts_lib_crypto_1 = require("@waves/ts-lib-crypto");
|
|
4
|
-
function ethTxId2waves(ethTxId) {
|
|
5
|
-
return ts_lib_crypto_1.base58Encode(ts_lib_crypto_1.base16Decode(ethTxId));
|
|
6
|
-
}
|
|
7
|
-
exports.default = ethTxId2waves;
|
|
8
|
-
//# sourceMappingURL=ethTxId2waves.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ethTxId2waves.js","sourceRoot":"","sources":["../../../src/tools/adresses/ethTxId2waves.ts"],"names":[],"mappings":";;AAAA,sDAAkE;AAElE,SAAwB,aAAa,CAAC,OAAe;IACjD,OAAO,4BAAY,CAAC,4BAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/C,CAAC;AAFD,gCAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function waves2eth(wavesAddress: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ts_lib_crypto_1 = require("@waves/ts-lib-crypto");
|
|
4
|
-
function waves2eth(wavesAddress) {
|
|
5
|
-
var rawBytes = ts_lib_crypto_1.base58Decode(wavesAddress);
|
|
6
|
-
var bytes = rawBytes.slice(2, rawBytes.byteLength - 4);
|
|
7
|
-
return ts_lib_crypto_1.base16Encode(bytes);
|
|
8
|
-
}
|
|
9
|
-
exports.default = waves2eth;
|
|
10
|
-
//# sourceMappingURL=wavesAddress2eth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waves2eth.js","sourceRoot":"","sources":["../../../src/tools/adresses/waves2eth.ts"],"names":[],"mappings":";;AAAA,sDAA+D;AAE/D,SAAwB,SAAS,CAAC,YAAoB;IAElD,IAAM,QAAQ,GAAG,4BAAY,CAAC,YAAY,CAAC,CAAC;IAE5C,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;IAExD,OAAO,4BAAY,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAPD,4BAOC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function convertWaves2Eth(wavesAsset: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ts_lib_crypto_1 = require("@waves/ts-lib-crypto");
|
|
4
|
-
function convertWaves2Eth(wavesAsset) {
|
|
5
|
-
var rawBytes = ts_lib_crypto_1.base58Decode(wavesAsset);
|
|
6
|
-
var bytes = rawBytes.slice(0, 20);
|
|
7
|
-
return ts_lib_crypto_1.base16Encode(bytes);
|
|
8
|
-
}
|
|
9
|
-
exports.default = convertWaves2Eth;
|
|
10
|
-
//# sourceMappingURL=convertWaves2Eth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertWaves2Eth.js","sourceRoot":"","sources":["../../../src/tools/assets/convertWaves2Eth.ts"],"names":[],"mappings":";;AAAA,sDAA+D;AAE/D,SAAwB,gBAAgB,CAAC,UAAkB;IAEvD,IAAM,QAAQ,GAAG,4BAAY,CAAC,UAAU,CAAC,CAAC;IAE1C,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEnC,OAAO,4BAAY,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAPD,mCAOC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function eth2waves(ethAddress: string, chainId: number): string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { keccak, blake2b, base58Encode, base16Decode } from '@waves/ts-lib-crypto';
|
|
2
|
-
export default function eth2waves(ethAddress, chainId) {
|
|
3
|
-
const prefixBytes = new Uint8Array([0x01, chainId]);
|
|
4
|
-
// Раскодировать HEX строку в байты (PK_HASH)
|
|
5
|
-
const pkHashBytes = base16Decode(ethAddress);
|
|
6
|
-
// Сделать чексумму CHECKSUM=keccak256(blake2b256([0x01, CHAIN_ID] + PK_HASH))
|
|
7
|
-
const checksumBytes = new Uint8Array([
|
|
8
|
-
...prefixBytes,
|
|
9
|
-
...pkHashBytes
|
|
10
|
-
]);
|
|
11
|
-
const checksum = keccak(blake2b(checksumBytes));
|
|
12
|
-
// склеить [0x01, CHAIN_ID] (два байта) + PK_HASH (изначальные 20 байт) + CHECKSUM[1:4] (первые четыре байта чексуммы)
|
|
13
|
-
const wavesBytes = new Uint8Array([
|
|
14
|
-
...prefixBytes,
|
|
15
|
-
...pkHashBytes.slice(0, 20),
|
|
16
|
-
...checksum.slice(0, 4)
|
|
17
|
-
]);
|
|
18
|
-
// закодировать в base58
|
|
19
|
-
const wavesAddress = base58Encode(wavesBytes);
|
|
20
|
-
return wavesAddress;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=ethAddress2waves.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eth2waves.js","sourceRoot":"","sources":["../../../src/tools/adresses/eth2waves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAElF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,UAAkB,EAAE,OAAe;IACjE,MAAM,WAAW,GAAG,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpD,6CAA6C;IAC7C,MAAM,WAAW,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAE7C,8EAA8E;IAC9E,MAAM,aAAa,GAAG,IAAI,UAAU,CAAC;QACjC,GAAG,WAAW;QACd,GAAG,WAAW;KACjB,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAEhD,sHAAsH;IACtH,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC;QAC9B,GAAG,WAAW;QACd,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;QAC3B,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;KAC1B,CAAC,CAAC;IAEH,wBAAwB;IACxB,MAAM,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAE9C,OAAO,YAAY,CAAC;AACxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function ethTxId2waves(ethTxId: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ethTxId2waves.js","sourceRoot":"","sources":["../../../src/tools/adresses/ethTxId2waves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAe;IACjD,OAAO,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function waves2eth(wavesAddress: string): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { base16Encode, base58Decode } from '@waves/ts-lib-crypto';
|
|
2
|
-
export default function waves2eth(wavesAddress) {
|
|
3
|
-
const rawBytes = base58Decode(wavesAddress);
|
|
4
|
-
const bytes = rawBytes.slice(2, rawBytes.byteLength - 4);
|
|
5
|
-
return base16Encode(bytes);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=wavesAddress2eth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waves2eth.js","sourceRoot":"","sources":["../../../src/tools/adresses/waves2eth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAE/D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,YAAoB;IAElD,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAE5C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;IAExD,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function convertWaves2Eth(wavesAsset: string): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { base16Encode, base58Decode } from '@waves/ts-lib-crypto';
|
|
2
|
-
export default function convertWaves2Eth(wavesAsset) {
|
|
3
|
-
const rawBytes = base58Decode(wavesAsset);
|
|
4
|
-
const bytes = rawBytes.slice(0, 20);
|
|
5
|
-
return base16Encode(bytes);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=convertWaves2Eth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertWaves2Eth.js","sourceRoot":"","sources":["../../../src/tools/assets/convertWaves2Eth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAE/D,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,UAAkB;IAEvD,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAE1C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEnC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|