@waves/node-api-js 1.2.5-beta.9 → 1.2.6-cjs.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/cjs/api-node/activation/index.js +2 -2
- package/cjs/api-node/activation/index.js.map +1 -1
- package/cjs/api-node/addresses/index.js +45 -54
- package/cjs/api-node/addresses/index.js.map +1 -1
- package/cjs/api-node/alias/index.js +5 -5
- package/cjs/api-node/alias/index.js.map +1 -1
- package/cjs/api-node/assets/index.js +60 -113
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/api-node/blocks/index.js +49 -60
- package/cjs/api-node/blocks/index.js.map +1 -1
- package/cjs/api-node/consensus/index.js +5 -6
- package/cjs/api-node/consensus/index.js.map +1 -1
- package/cjs/api-node/debug/index.js +14 -17
- package/cjs/api-node/debug/index.js.map +1 -1
- package/cjs/api-node/eth/index.js +5 -5
- package/cjs/api-node/eth/index.js.map +1 -1
- package/cjs/api-node/leasing/index.js +7 -19
- package/cjs/api-node/leasing/index.js.map +1 -1
- package/cjs/api-node/node/index.js +5 -7
- package/cjs/api-node/node/index.js.map +1 -1
- package/cjs/api-node/peers/index.js +13 -17
- package/cjs/api-node/peers/index.js.map +1 -1
- package/cjs/api-node/rewards/index.js +5 -6
- package/cjs/api-node/rewards/index.js.map +1 -1
- package/cjs/api-node/transactions/index.js +42 -82
- package/cjs/api-node/transactions/index.js.map +1 -1
- package/cjs/api-node/utils/index.js +22 -22
- package/cjs/api-node/utils/index.js.map +1 -1
- package/cjs/create.d.ts +26 -1
- package/cjs/create.js +59 -59
- package/cjs/create.js.map +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +5 -5
- package/cjs/index.js.map +1 -1
- package/cjs/interface.js +2 -6
- package/cjs/interface.js.map +1 -1
- package/cjs/tools/adresses/availableSponsoredBalances.js +9 -9
- package/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -1
- package/cjs/tools/adresses/ethAddress2waves.js +16 -29
- package/cjs/tools/adresses/ethAddress2waves.js.map +1 -1
- package/cjs/tools/adresses/getAssetIdListByTx.js +15 -36
- package/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -1
- package/cjs/tools/adresses/getAssetsByTransaction.js +4 -4
- package/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -1
- package/cjs/tools/adresses/getTransactionsWithAssets.js +3 -3
- package/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -1
- package/cjs/tools/adresses/watch.js +56 -85
- package/cjs/tools/adresses/watch.js.map +1 -1
- package/cjs/tools/adresses/wavesAddress2eth.js +4 -4
- package/cjs/tools/adresses/wavesAddress2eth.js.map +1 -1
- package/cjs/tools/assets/wavesAsset2eth.js +4 -4
- package/cjs/tools/assets/wavesAsset2eth.js.map +1 -1
- package/cjs/tools/blocks/detectInterval.js +4 -4
- package/cjs/tools/blocks/detectInterval.js.map +1 -1
- package/cjs/tools/blocks/getNetworkByte.js +6 -6
- package/cjs/tools/blocks/getNetworkByte.js.map +1 -1
- package/cjs/tools/blocks/getNetworkCode.js +2 -2
- package/cjs/tools/blocks/getNetworkCode.js.map +1 -1
- package/cjs/tools/blocks/waitHeight.js +13 -36
- package/cjs/tools/blocks/waitHeight.js.map +1 -1
- package/cjs/tools/parse.js +2 -2
- package/cjs/tools/parse.js.map +1 -1
- package/cjs/tools/query.js +8 -34
- package/cjs/tools/query.js.map +1 -1
- package/cjs/tools/request.d.ts +1 -1
- package/cjs/tools/request.js +7 -19
- package/cjs/tools/request.js.map +1 -1
- package/cjs/tools/stringify.js +3 -3
- package/cjs/tools/stringify.js.map +1 -1
- package/cjs/tools/transactions/broadcast.js +18 -29
- package/cjs/tools/transactions/broadcast.js.map +1 -1
- package/cjs/tools/transactions/ethTxId2waves.js +2 -2
- package/cjs/tools/transactions/ethTxId2waves.js.map +1 -1
- package/cjs/tools/transactions/transactions.d.ts +5 -5
- package/cjs/tools/transactions/transactions.js +54 -68
- package/cjs/tools/transactions/transactions.js.map +1 -1
- package/cjs/tools/transactions/wait.js +16 -16
- package/cjs/tools/transactions/wait.js.map +1 -1
- package/cjs/tools/utils.js +30 -63
- package/cjs/tools/utils.js.map +1 -1
- package/dist/node-api.js +578 -47
- package/dist/node-api.min.js +5 -5
- package/es/create.d.ts +26 -1
- package/es/index.d.ts +1 -0
- package/es/index.js.map +1 -1
- package/es/tools/request.d.ts +1 -1
- package/es/tools/request.js +1 -1
- package/es/tools/request.js.map +1 -1
- package/es/tools/transactions/transactions.d.ts +5 -5
- package/es/tools/transactions/transactions.js +7 -7
- package/es/tools/transactions/transactions.js.map +1 -1
- package/package.json +4 -4
- 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
package/es/create.d.ts
CHANGED
|
@@ -242,6 +242,11 @@ export declare function create(base: string): {
|
|
|
242
242
|
} & import("@waves/ts-types").WithId & {
|
|
243
243
|
sender: string;
|
|
244
244
|
height: number;
|
|
245
|
+
}) | (import("@waves/ts-types").InvokeExpressionTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
246
|
+
version: 1;
|
|
247
|
+
} & import("@waves/ts-types").WithId & {
|
|
248
|
+
sender: string;
|
|
249
|
+
height: number;
|
|
245
250
|
}) | ((import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
246
251
|
version: 1;
|
|
247
252
|
} & import("@waves/ts-types").WithId & {
|
|
@@ -449,6 +454,11 @@ export declare function create(base: string): {
|
|
|
449
454
|
} & import("@waves/ts-types").WithId & {
|
|
450
455
|
sender: string;
|
|
451
456
|
height: number;
|
|
457
|
+
}) | (import("@waves/ts-types").InvokeExpressionTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
458
|
+
version: 1;
|
|
459
|
+
} & import("@waves/ts-types").WithId & {
|
|
460
|
+
sender: string;
|
|
461
|
+
height: number;
|
|
452
462
|
}))[], 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> & {
|
|
453
463
|
version: 1;
|
|
454
464
|
} & import("@waves/ts-types").WithId & {
|
|
@@ -656,6 +666,11 @@ export declare function create(base: string): {
|
|
|
656
666
|
} & import("@waves/ts-types").WithId & {
|
|
657
667
|
sender: string;
|
|
658
668
|
height: number;
|
|
669
|
+
}) | (import("@waves/ts-types").InvokeExpressionTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
670
|
+
version: 1;
|
|
671
|
+
} & import("@waves/ts-types").WithId & {
|
|
672
|
+
sender: string;
|
|
673
|
+
height: number;
|
|
659
674
|
}) | ((import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
660
675
|
version: 1;
|
|
661
676
|
} & import("@waves/ts-types").WithId & {
|
|
@@ -863,6 +878,11 @@ export declare function create(base: string): {
|
|
|
863
878
|
} & import("@waves/ts-types").WithId & {
|
|
864
879
|
sender: string;
|
|
865
880
|
height: number;
|
|
881
|
+
}) | (import("@waves/ts-types").InvokeExpressionTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
882
|
+
version: 1;
|
|
883
|
+
} & import("@waves/ts-types").WithId & {
|
|
884
|
+
sender: string;
|
|
885
|
+
height: number;
|
|
866
886
|
}))[]>;
|
|
867
887
|
};
|
|
868
888
|
blocks: {
|
|
@@ -878,7 +898,7 @@ export declare function create(base: string): {
|
|
|
878
898
|
fee: import("@waves/ts-types").Long;
|
|
879
899
|
}, 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> & {
|
|
880
900
|
feeAssetId: string | null;
|
|
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, 19>, 1> | Transaction<import("@waves/ts-types").Long>[]) => Promise<Record<string, assetsModule.TAssetDetails<import("@waves/ts-types").Long>>>;
|
|
901
|
+
}, 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, 19>, 1> | import("@waves/ts-types").WithVersion<import("@waves/ts-types").InvokeExpressionTransactionFields<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>>>;
|
|
882
902
|
getAssetIdListByTx: typeof getAssetIdListByTx;
|
|
883
903
|
getTransactionsWithAssets: (address: string, limit: number, after?: string | undefined) => Promise<{
|
|
884
904
|
transactions: ((import("@waves/ts-types").ExchangeTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 7> & {
|
|
@@ -1088,6 +1108,11 @@ export declare function create(base: string): {
|
|
|
1088
1108
|
} & import("@waves/ts-types").WithId & {
|
|
1089
1109
|
sender: string;
|
|
1090
1110
|
height: number;
|
|
1111
|
+
}) | (import("@waves/ts-types").InvokeExpressionTransactionFields<import("@waves/ts-types").Long> & import("@waves/ts-types").BaseTransaction<import("@waves/ts-types").Long, 18> & {
|
|
1112
|
+
version: 1;
|
|
1113
|
+
} & import("@waves/ts-types").WithId & {
|
|
1114
|
+
sender: string;
|
|
1115
|
+
height: number;
|
|
1091
1116
|
}))[];
|
|
1092
1117
|
assets: Record<string, assetsModule.TAssetDetails<import("@waves/ts-types").Long>>;
|
|
1093
1118
|
}>;
|
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/request.d.ts
CHANGED
package/es/tools/request.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import resolve from './resolve';
|
|
2
2
|
import parse from './parse';
|
|
3
|
-
|
|
3
|
+
import request from 'cross-fetch';
|
|
4
4
|
export default function (params) {
|
|
5
5
|
return request(resolve(params.url, params.base), updateHeaders(params.options))
|
|
6
6
|
.then(parseResponse);
|
package/es/tools/request.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/tools/request.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/tools/request.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,OAAO,WAAc,MAAyB;IACjD,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SAC1E,IAAI,CAAC,aAAa,CAAe,CAAC;AAC3C,CAAC;AAED,SAAS,aAAa,CAAI,CAAW;IACjC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,QAAQ,CAAC,OAAe;IAC7B,IAAI;QACA,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC9B;IAAC,OAAO,CAAC,EAAE;QACR,OAAO,OAAO,CAAC;KAClB;AACL,CAAC;AAED,SAAS,aAAa,CAAC,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC7D,uBACI,WAAW,EAAG,SAAiB,IAC5B,OAAO,EACZ;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IWithStateChanges, TPayment, TStateChanges } from "../../api-node/debug";
|
|
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/
|
|
2
|
+
import { AssetDecimals, DataTransactionEntry, InvokeExpressionTransaction, 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> | (InvokeExpressionTransaction<LONG> & TWithState) | 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,20 +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
|
-
if (transaction.type === TRANSACTION_TYPE.INVOKE_SCRIPT && transaction.stateChanges.invokes && transaction.stateChanges.invokes.length) {
|
|
5
|
-
const payments = transaction.payment ? transaction.payment.map(p => ({
|
|
4
|
+
if (transaction.type === TRANSACTION_TYPE.INVOKE_SCRIPT || transaction.type === TRANSACTION_TYPE.INVOKE_EXPRESSION && transaction.stateChanges.invokes && transaction.stateChanges.invokes.length) {
|
|
5
|
+
const payments = transaction.payment ? transaction.payment.map((p) => ({
|
|
6
6
|
assetId: p.assetId,
|
|
7
7
|
amount: p.amount
|
|
8
8
|
})) : [];
|
|
9
|
-
return Object.defineProperty(transaction, 'stateUpdate', { get: () => makeStateUpdate(transaction.stateChanges, payments, transaction.dApp, transaction.sender) });
|
|
10
9
|
}
|
|
11
|
-
if (transaction.type === TRANSACTION_TYPE.ETHEREUM && transaction.payload.type === 'invocation' && transaction.stateChanges.invokes && transaction.stateChanges.invokes.length) {
|
|
12
|
-
const payments = transaction.payload.payment ? transaction.payload.payment.map(p => ({
|
|
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) => ({
|
|
13
12
|
assetId: p.assetId,
|
|
14
13
|
amount: p.amount
|
|
15
14
|
})) : [];
|
|
16
15
|
const dApp = transaction.payload.dApp || '';
|
|
17
|
-
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
return Object.defineProperty(transaction, 'stateUpdate', { get: () => makeStateUpdate(transaction.payload.stateChanges, payments, dApp, transaction.sender) });
|
|
18
18
|
}
|
|
19
19
|
else
|
|
20
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":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAKH,gBAAgB,EAEnB,MAAM,kBAAkB,CAAC;AAmF1B,MAAM,UAAU,mBAAmB,CAAC,WAAiE;IACjG,IAAI,WAAW,CAAC,IAAI,KAAK,gBAAgB,CAAC,aAAa,IAAI,WAAW,CAAC,IAAI,KAAK,gBAAgB,CAAC,iBAAiB,IAAI,WAAW,CAAC,YAAY,CAAC,OAAO,IAAI,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE;QAC/L,MAAM,QAAQ,GAAI,WAAmB,CAAC,OAAO,CAAC,CAAC,CAAE,WAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;YAC/F,OA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,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,iCAAK,CAAC,KAAE,MAAM,EAAE,CAAC,CAAC,IAAI,IAAE,CAAC,CAAA;gBACnF,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,iCAAK,CAAC,KAAE,OAAO,EAAE,CAAC,CAAC,IAAI,IAAE,CAAC,CAAA;gBAEhG,iBAAiB,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;YAC7C,CAAC,CACJ,CAAA;SACJ;IACL,CAAC,CAAA;IAED,iBAAiB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;IACvC,OAAO,WAAW,CAAA;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waves/node-api-js",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6-cjs.0",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"types": "cjs/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"testCommand": "jest",
|
|
8
8
|
"prepare": "npm run build",
|
|
9
|
-
"build": "tsc -p ./tsconfig-es.json && tsc -p ./tsconfig-cjs.json && webpack",
|
|
9
|
+
"build": "rm -rf ./es && tsc -p ./tsconfig-es.json && rm -rf ./cjs && tsc -p ./tsconfig-cjs.json && webpack",
|
|
10
10
|
"test": "node-state -e -n -m typescript -o ./test/_state.ts -r"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@types/node-fetch": "^2.5.4",
|
|
14
14
|
"@waves/bignumber": "^1.1.1",
|
|
15
|
-
"@waves/ts-types": "^1.0.6-beta.
|
|
16
|
-
"
|
|
15
|
+
"@waves/ts-types": "^1.0.6-beta.7",
|
|
16
|
+
"cross-fetch": "^3.1.5",
|
|
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"}
|