@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 {};
|
|
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.fetchBalanceAddressAssetId = exports.fetchAssetsBalance = exports.fetchAssetsAddressLimit = exports.fetchAssetDistribution = exports.fetchAssetsDetails = exports.fetchDetails = void 0;
|
|
42
|
+
exports.fetchBalanceAddressAssetId = exports.fetchAssetsBalance = exports.fetchAssetsNft = exports.fetchAssetsAddressLimit = exports.fetchAssetDistribution = exports.fetchAssetsDetails = exports.fetchDetails = void 0;
|
|
43
43
|
var ts_types_1 = require("@waves/ts-types");
|
|
44
44
|
var request_1 = __importDefault(require("../../tools/request"));
|
|
45
45
|
var utils_1 = require("../../tools/utils");
|
|
@@ -82,6 +82,16 @@ function fetchAssetsAddressLimit(base, address, limit, options) {
|
|
|
82
82
|
return request_1.default({ base: base, url: "assets/nft/" + address + "/limit/" + limit, options: options });
|
|
83
83
|
}
|
|
84
84
|
exports.fetchAssetsAddressLimit = fetchAssetsAddressLimit;
|
|
85
|
+
function fetchAssetsNft(base, _a, options) {
|
|
86
|
+
var address = _a.address, limit = _a.limit, after = _a.after;
|
|
87
|
+
if (options === void 0) { options = Object.create(null); }
|
|
88
|
+
var url = new URL("assets/nft/" + address + "/limit/" + limit, base);
|
|
89
|
+
if (after) {
|
|
90
|
+
url.searchParams.append('after', after);
|
|
91
|
+
}
|
|
92
|
+
return request_1.default({ base: base, url: "" + url.pathname + url.search, options: options });
|
|
93
|
+
}
|
|
94
|
+
exports.fetchAssetsNft = fetchAssetsNft;
|
|
85
95
|
function fetchAssetsBalance(base, address, options) {
|
|
86
96
|
if (options === void 0) { options = Object.create(null); }
|
|
87
97
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1 +1 @@
|
|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AmB;4BACpC,IAAI,EAAE,YAAY,CAAC,IAAI;4BACvB,QAAQ,EAAE,YAAY,CAAC,QAAQ;4BAC/B,WAAW,EAAE,YAAY,CAAC,WAAW;4BACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ;4BAC/B,UAAU,EAAE,YAAY,CAAC,UAAU;4BACnC,MAAM,EAAE,YAAY,CAAC,MAAM;4BAC3B,eAAe,EAAE,YAAY,CAAC,eAAe;4BAC7C,SAAS,EAAE,YAAY,CAAC,cAAc;4BACtC,MAAM,EAAE,YAAY,CAAC,WAAW;4BAChC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;4BAC1C,MAAM,EAAE,EAAE;4BACV,GAAG,EAAE,SAAA,EAAE,EAAI,CAAC,CAAA;4BACZ,UAAU,EAAE,IAAI;4BAChB,OAAO,EAAE,CAAC;4BACV,IAAI,EAAE,2BAAgB,CAAC,KAAK;4BAC5B,OAAO,EAAE,CAAC;yBACb,CAAC;oBACN,CAAC,CAAC,CAAC;oBAEH,sBAAO,gBAAgB,EAAC;;;;CAC3B;AAjDD,gDAiDC;AAED,SAAgB,0BAA0B,CAAC,IAAY,EAAE,OAAe,EAAE,OAAe,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjI,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,qBAAmB,OAAO,SAAI,OAAS,EAAE,OAAO,SAAA,EAAC,CAAC,CAAC;AAClF,CAAC;AAFD,gEAEC"}
|
package/cjs/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/cjs/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/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,uFAAiE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,uFAAiE;AAQ7D,2BARG,0BAAgB,CAQH;AAPpB,uFAAiE;AAQ7D,2BARG,0BAAgB,CAQH;AAPpB,iFAA2D;AAQvD,yBARG,wBAAc,CAQH;AAPlB,qFAA+D;AAQ3D,wBARG,uBAAa,CAQH;AANjB,mCAA8C;AASjC,QAAA,MAAM,GAAG,eAAQ,CAAC;AAE/B,kBAAe,eAAQ,CAAC"}
|
package/cjs/tools/stringify.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var FIELDS = ['amount', 'matcherFee', 'price', '
|
|
3
|
+
var FIELDS = ['amount', 'matcherFee', 'price', 'minSponsoredAssetFee', 'fee', 'quantity', 'sellMatcherFee', 'buyMatcherFee'];
|
|
4
4
|
function default_1(data) {
|
|
5
5
|
return JSON.stringify(data, function (key, value) {
|
|
6
|
-
if (FIELDS.includes(key)) {
|
|
6
|
+
if (FIELDS.includes(key) && value) {
|
|
7
7
|
return "!" + value + "!";
|
|
8
8
|
}
|
|
9
9
|
else if (key === 'value' && this['type'] === 'integer') {
|
|
10
10
|
return "!" + value + "!";
|
|
11
11
|
}
|
|
12
|
+
else if (key === 'minSponsoredAssetFee' && value == null) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
12
15
|
else {
|
|
13
16
|
return value;
|
|
14
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringify.js","sourceRoot":"","sources":["../../src/tools/stringify.ts"],"names":[],"mappings":";;AAYA,IAAM,MAAM,GAA4B,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"stringify.js","sourceRoot":"","sources":["../../src/tools/stringify.ts"],"names":[],"mappings":";;AAYA,IAAM,MAAM,GAA4B,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC;AAExJ,mBAAwD,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,MAAI,KAAK,MAAG,CAAC;SACvB;aAAM,IAAI,GAAG,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;YACtD,OAAO,MAAI,KAAK,MAAG,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;AAZD,4BAYC"}
|
|
@@ -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;
|
|
@@ -13,14 +13,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.makeStateUpdate = exports.addStateUpdateField = void 0;
|
|
15
15
|
var bignumber_1 = require("@waves/bignumber");
|
|
16
|
-
var ts_types_1 = require("@waves/ts-types");
|
|
16
|
+
var ts_types_1 = require("@waves/ts-types/");
|
|
17
17
|
function addStateUpdateField(transaction) {
|
|
18
18
|
if (transaction.type === ts_types_1.TRANSACTION_TYPE.INVOKE_SCRIPT && transaction.stateChanges.invokes && transaction.stateChanges.invokes.length) {
|
|
19
|
-
var
|
|
19
|
+
var payments = transaction.payment ? transaction.payment.map(function (p) { return ({
|
|
20
20
|
assetId: p.assetId,
|
|
21
21
|
amount: p.amount
|
|
22
22
|
}); }) : [];
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
if (transaction.type === ts_types_1.TRANSACTION_TYPE.ETHEREUM && transaction.payload.type === 'invocation' && transaction.payload.stateChanges.invokes && transaction.payload.stateChanges.invokes.length) {
|
|
25
|
+
var payments_1 = transaction.payload.payment ? transaction.payload.payment.map(function (p) { return ({
|
|
26
|
+
assetId: p.assetId,
|
|
27
|
+
amount: p.amount
|
|
28
|
+
}); }) : [];
|
|
29
|
+
var dApp_1 = transaction.payload.dApp || '';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
return Object.defineProperty(transaction, 'stateUpdate', { get: function () { return makeStateUpdate(transaction.payload.stateChanges, payments_1, dApp_1, transaction.sender); } });
|
|
24
32
|
}
|
|
25
33
|
else
|
|
26
34
|
return transaction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/tools/transactions/transactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,8CAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/tools/transactions/transactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,8CAA2C;AAC3C,6CAM0B;AAkF1B,SAAgB,mBAAmB,CAAC,WAAiE;IACjG,IAAI,WAAW,CAAC,IAAI,KAAK,2BAAgB,CAAC,aAAa,IAAI,WAAW,CAAC,YAAY,CAAC,OAAO,IAAI,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE;QACpI,IAAM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