@partisiablockchain/blockchain-api-transaction-client 4.140.0 → 5.1.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/package.json +18 -4
- package/target/main/CryptoUtils.d.ts +40 -0
- package/target/main/CryptoUtils.js +86 -0
- package/target/main/CryptoUtils.js.map +1 -0
- package/target/main/generated/openapi/apis/ChainControllerApi.d.ts +14 -1
- package/target/main/generated/openapi/apis/ChainControllerApi.js +34 -0
- package/target/main/generated/openapi/apis/ChainControllerApi.js.map +1 -1
- package/target/main/generated/openapi/models/AvlInformation.d.ts +31 -0
- package/target/main/generated/openapi/models/AvlInformation.js +47 -0
- package/target/main/generated/openapi/models/AvlInformation.js.map +1 -0
- package/target/main/generated/openapi/models/index.d.ts +1 -0
- package/target/main/generated/openapi/models/index.js +1 -0
- package/target/main/generated/openapi/models/index.js.map +1 -1
- package/target/main/index.d.ts +5 -0
- package/target/main/index.js +9 -0
- package/target/main/index.js.map +1 -1
- package/target/main/transactionclient/BlockchainTransactionClient.d.ts +113 -0
- package/target/main/transactionclient/BlockchainTransactionClient.js +243 -0
- package/target/main/transactionclient/BlockchainTransactionClient.js.map +1 -0
- package/target/main/transactionclient/ConditionWaiter.d.ts +57 -0
- package/target/main/transactionclient/ConditionWaiter.js +94 -0
- package/target/main/transactionclient/ConditionWaiter.js.map +1 -0
- package/target/main/transactionclient/SenderAuthenticationKeyPair.d.ts +24 -0
- package/target/main/transactionclient/SenderAuthenticationKeyPair.js +68 -0
- package/target/main/transactionclient/SenderAuthenticationKeyPair.js.map +1 -0
- package/target/main/transactionclient/SignedTransaction.d.ts +54 -0
- package/target/main/transactionclient/SignedTransaction.js +128 -0
- package/target/main/transactionclient/SignedTransaction.js.map +1 -0
- package/target/main/transactionclient/types.d.ts +49 -0
- package/target/main/transactionclient/types.js +20 -0
- package/target/main/transactionclient/types.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@partisiablockchain/blockchain-api-transaction-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@secata-public/bitmanipulation-ts": "^3.1.0",
|
|
9
|
+
"@types/elliptic": "^6.4.15",
|
|
10
|
+
"elliptic": "^6.5.5",
|
|
11
|
+
"hash.js": "^1.1.7",
|
|
12
|
+
"bn.js": "^5.2.1"
|
|
13
|
+
},
|
|
7
14
|
"devDependencies": {
|
|
15
|
+
"@stryker-mutator/core": "^8.2.6",
|
|
16
|
+
"@stryker-mutator/jest-runner": "^8.2.6",
|
|
17
|
+
"@stryker-mutator/typescript-checker": "^8.2.6",
|
|
8
18
|
"@eslint/eslintrc": "^3.0.2",
|
|
9
19
|
"@types/jest": "^29.5.5",
|
|
10
20
|
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
11
21
|
"eslint": "^8.57.0",
|
|
12
22
|
"eslint-plugin-import": "^2.26.0",
|
|
23
|
+
"eslint-plugin-jsdoc": "^48.2.5",
|
|
13
24
|
"globals": "^15.0.0",
|
|
14
25
|
"jest": "^29.7.0",
|
|
15
26
|
"ts-jest": "^29.1.1",
|
|
@@ -19,8 +30,8 @@
|
|
|
19
30
|
"build": "npx tsc",
|
|
20
31
|
"lint": "npx eslint src --max-warnings 0",
|
|
21
32
|
"prettier": "npx prettier --config package.json src --write",
|
|
22
|
-
"test": "npx jest
|
|
23
|
-
"stryker": "
|
|
33
|
+
"test": "npx jest",
|
|
34
|
+
"stryker": "stryker run"
|
|
24
35
|
},
|
|
25
36
|
"publishConfig": {
|
|
26
37
|
"access": "public",
|
|
@@ -39,5 +50,8 @@
|
|
|
39
50
|
"target/main"
|
|
40
51
|
],
|
|
41
52
|
"main": "target/main/index.js",
|
|
42
|
-
"types": "target/main/index.d.ts"
|
|
53
|
+
"types": "target/main/index.d.ts",
|
|
54
|
+
"eslintConfig": {
|
|
55
|
+
"extends": "./eslint-jsdoc.json"
|
|
56
|
+
}
|
|
43
57
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ec as Elliptic } from "elliptic";
|
|
2
|
+
/**
|
|
3
|
+
* Serializes a signature into byte.
|
|
4
|
+
* @param signature the signature.
|
|
5
|
+
* @returns the bytes.
|
|
6
|
+
*/
|
|
7
|
+
declare function signatureToBuffer(signature: Elliptic.Signature): Buffer;
|
|
8
|
+
/**
|
|
9
|
+
* Computes the account address based on a key pair.
|
|
10
|
+
* @param keyPair the keypair of the account.
|
|
11
|
+
* @returns the address of the account.
|
|
12
|
+
*/
|
|
13
|
+
declare function keyPairToAccountAddress(keyPair: Elliptic.KeyPair): string;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a keypair based on the private key.
|
|
16
|
+
* @param privateKey the private key as a hex string.
|
|
17
|
+
* @returns the keypair.
|
|
18
|
+
*/
|
|
19
|
+
declare function privateKeyToKeypair(privateKey: string): Elliptic.KeyPair;
|
|
20
|
+
/**
|
|
21
|
+
* Hashes the buffers.
|
|
22
|
+
* @param buffers the buffers to be hashed.
|
|
23
|
+
* @returns the hash.
|
|
24
|
+
*/
|
|
25
|
+
declare function hashBuffers(buffers: Buffer[]): Buffer;
|
|
26
|
+
/**
|
|
27
|
+
* Hashes the buffer.
|
|
28
|
+
* @param buffer the buffer to be hashed.
|
|
29
|
+
* @returns the hash.
|
|
30
|
+
*/
|
|
31
|
+
declare function hashBuffer(buffer: Buffer): Buffer;
|
|
32
|
+
/** A collection of useful crypto functions. */
|
|
33
|
+
export declare const CryptoUtils: {
|
|
34
|
+
signatureToBuffer: typeof signatureToBuffer;
|
|
35
|
+
keyPairToAccountAddress: typeof keyPairToAccountAddress;
|
|
36
|
+
privateKeyToKeypair: typeof privateKeyToKeypair;
|
|
37
|
+
hashBuffers: typeof hashBuffers;
|
|
38
|
+
hashBuffer: typeof hashBuffer;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (C) 2022 - 2023 Partisia Blockchain Foundation
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.CryptoUtils = void 0;
|
|
21
|
+
const elliptic_1 = require("elliptic");
|
|
22
|
+
const hash_js_1 = require("hash.js");
|
|
23
|
+
const ec = new elliptic_1.ec("secp256k1");
|
|
24
|
+
/**
|
|
25
|
+
* Serializes a signature into byte.
|
|
26
|
+
* @param signature the signature.
|
|
27
|
+
* @returns the bytes.
|
|
28
|
+
*/
|
|
29
|
+
function signatureToBuffer(signature) {
|
|
30
|
+
if (signature.recoveryParam == null) {
|
|
31
|
+
throw new Error("Recovery parameter is null");
|
|
32
|
+
}
|
|
33
|
+
return Buffer.concat([
|
|
34
|
+
Buffer.from([signature.recoveryParam]),
|
|
35
|
+
signature.r.toArrayLike(Buffer, "be", 32),
|
|
36
|
+
signature.s.toArrayLike(Buffer, "be", 32),
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Computes the account address based on a key pair.
|
|
41
|
+
* @param keyPair the keypair of the account.
|
|
42
|
+
* @returns the address of the account.
|
|
43
|
+
*/
|
|
44
|
+
function keyPairToAccountAddress(keyPair) {
|
|
45
|
+
const publicKey = keyPair.getPublic(false, "array");
|
|
46
|
+
const hash = (0, hash_js_1.sha256)();
|
|
47
|
+
hash.update(publicKey);
|
|
48
|
+
return "00" + hash.digest("hex").substring(24);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Creates a keypair based on the private key.
|
|
52
|
+
* @param privateKey the private key as a hex string.
|
|
53
|
+
* @returns the keypair.
|
|
54
|
+
*/
|
|
55
|
+
function privateKeyToKeypair(privateKey) {
|
|
56
|
+
return ec.keyFromPrivate(privateKey);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Hashes the buffers.
|
|
60
|
+
* @param buffers the buffers to be hashed.
|
|
61
|
+
* @returns the hash.
|
|
62
|
+
*/
|
|
63
|
+
function hashBuffers(buffers) {
|
|
64
|
+
const hash = (0, hash_js_1.sha256)();
|
|
65
|
+
for (const buffer of buffers) {
|
|
66
|
+
hash.update(buffer);
|
|
67
|
+
}
|
|
68
|
+
return Buffer.from(hash.digest());
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Hashes the buffer.
|
|
72
|
+
* @param buffer the buffer to be hashed.
|
|
73
|
+
* @returns the hash.
|
|
74
|
+
*/
|
|
75
|
+
function hashBuffer(buffer) {
|
|
76
|
+
return hashBuffers([buffer]);
|
|
77
|
+
}
|
|
78
|
+
/** A collection of useful crypto functions. */
|
|
79
|
+
exports.CryptoUtils = {
|
|
80
|
+
signatureToBuffer,
|
|
81
|
+
keyPairToAccountAddress,
|
|
82
|
+
privateKeyToKeypair,
|
|
83
|
+
hashBuffers,
|
|
84
|
+
hashBuffer,
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=CryptoUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoUtils.js","sourceRoot":"","sources":["../../src/main/CryptoUtils.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;IACtB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CAAC,MAAc;IAChC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC;AAED,+CAA+C;AAClC,QAAA,WAAW,GAAG;IACzB,iBAAiB;IACjB,uBAAuB;IACvB,mBAAmB;IACnB,WAAW;IACX,UAAU;CACX,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Account, AvlStateEntry, AvlStateValue, Chain, Contract, SerializedTransaction, TransactionPointer } from '../models/index';
|
|
13
|
+
import type { Account, AvlInformation, AvlStateEntry, AvlStateValue, Chain, Contract, SerializedTransaction, TransactionPointer } from '../models/index';
|
|
14
14
|
export interface GetAccountRequest {
|
|
15
15
|
address: string;
|
|
16
16
|
blockTime?: number;
|
|
@@ -22,6 +22,11 @@ export interface GetContractRequest {
|
|
|
22
22
|
address: string;
|
|
23
23
|
blockTime?: number;
|
|
24
24
|
}
|
|
25
|
+
export interface GetContractAvlInformationRequest {
|
|
26
|
+
address: string;
|
|
27
|
+
treeId: number;
|
|
28
|
+
blockTime?: number;
|
|
29
|
+
}
|
|
25
30
|
export interface GetContractAvlModifiedKeysRequest {
|
|
26
31
|
address: string;
|
|
27
32
|
treeId: number;
|
|
@@ -73,6 +78,14 @@ export declare class ChainControllerApi extends runtime.BaseAPI {
|
|
|
73
78
|
* Get a specific contract by address.
|
|
74
79
|
*/
|
|
75
80
|
getContract(requestParameters: GetContractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Contract>;
|
|
81
|
+
/**
|
|
82
|
+
* Get information about the avl tree such as size of the tree
|
|
83
|
+
*/
|
|
84
|
+
getContractAvlInformationRaw(requestParameters: GetContractAvlInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AvlInformation>>;
|
|
85
|
+
/**
|
|
86
|
+
* Get information about the avl tree such as size of the tree
|
|
87
|
+
*/
|
|
88
|
+
getContractAvlInformation(requestParameters: GetContractAvlInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AvlInformation>;
|
|
76
89
|
/**
|
|
77
90
|
* Get the modified keys of an AvlTree between two block times.
|
|
78
91
|
*/
|
|
@@ -142,6 +142,40 @@ class ChainControllerApi extends runtime.BaseAPI {
|
|
|
142
142
|
return yield response.value();
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Get information about the avl tree such as size of the tree
|
|
147
|
+
*/
|
|
148
|
+
getContractAvlInformationRaw(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
if (requestParameters['address'] == null) {
|
|
151
|
+
throw new runtime.RequiredError('address', 'Required parameter "address" was null or undefined when calling getContractAvlInformation().');
|
|
152
|
+
}
|
|
153
|
+
if (requestParameters['treeId'] == null) {
|
|
154
|
+
throw new runtime.RequiredError('treeId', 'Required parameter "treeId" was null or undefined when calling getContractAvlInformation().');
|
|
155
|
+
}
|
|
156
|
+
const queryParameters = {};
|
|
157
|
+
if (requestParameters['blockTime'] != null) {
|
|
158
|
+
queryParameters['blockTime'] = requestParameters['blockTime'];
|
|
159
|
+
}
|
|
160
|
+
const headerParameters = {};
|
|
161
|
+
const response = yield this.request({
|
|
162
|
+
path: `/chain/contracts/{address}/avl/{treeId}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters['address']))).replace(`{${"treeId"}}`, encodeURIComponent(String(requestParameters['treeId']))),
|
|
163
|
+
method: 'GET',
|
|
164
|
+
headers: headerParameters,
|
|
165
|
+
query: queryParameters,
|
|
166
|
+
}, initOverrides);
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AvlInformationFromJSON)(jsonValue));
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get information about the avl tree such as size of the tree
|
|
172
|
+
*/
|
|
173
|
+
getContractAvlInformation(requestParameters, initOverrides) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
const response = yield this.getContractAvlInformationRaw(requestParameters, initOverrides);
|
|
176
|
+
return yield response.value();
|
|
177
|
+
});
|
|
178
|
+
}
|
|
145
179
|
/**
|
|
146
180
|
* Get the modified keys of an AvlTree between two block times.
|
|
147
181
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainControllerApi.js","sourceRoot":"","sources":["../../../../../src/main/generated/openapi/apis/ChainControllerApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,oDAAsC;
|
|
1
|
+
{"version":3,"file":"ChainControllerApi.js","sourceRoot":"","sources":["../../../../../src/main/generated/openapi/apis/ChainControllerApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,oDAAsC;AAWtC,2CAiByB;AAiDzB;;GAEG;AACH,MAAa,kBAAmB,SAAQ,OAAO,CAAC,OAAO;IAEnD;;OAEG;IACG,aAAa,CAAC,iBAAoC,EAAE,aAA0D;;YAChH,IAAI,iBAAiB,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;gBACvC,MAAM,IAAI,OAAO,CAAC,aAAa,CAC3B,SAAS,EACT,+EAA+E,CAClF,CAAC;YACN,CAAC;YAED,MAAM,eAAe,GAAQ,EAAE,CAAC;YAEhC,IAAI,iBAAiB,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC;gBACzC,eAAe,CAAC,WAAW,CAAC,GAAG,iBAAiB,CAAC,W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,iBAAiB,EAAE,aAAa,CAAC,CAAC;YAChF,OAAO,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;QAClC,CAAC;KAAA;CAEJ;AA5VD,gDA4VC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* server
|
|
3
|
+
* <h1>server</h1>
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 4.39.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AvlInformation
|
|
16
|
+
*/
|
|
17
|
+
export interface AvlInformation {
|
|
18
|
+
/**
|
|
19
|
+
* Size of the avl tree
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof AvlInformation
|
|
22
|
+
*/
|
|
23
|
+
size: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the AvlInformation interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfAvlInformation(value: object): value is AvlInformation;
|
|
29
|
+
export declare function AvlInformationFromJSON(json: any): AvlInformation;
|
|
30
|
+
export declare function AvlInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AvlInformation;
|
|
31
|
+
export declare function AvlInformationToJSON(value?: AvlInformation | null): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* server
|
|
6
|
+
* <h1>server</h1>
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 4.39.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAvlInformation = instanceOfAvlInformation;
|
|
17
|
+
exports.AvlInformationFromJSON = AvlInformationFromJSON;
|
|
18
|
+
exports.AvlInformationFromJSONTyped = AvlInformationFromJSONTyped;
|
|
19
|
+
exports.AvlInformationToJSON = AvlInformationToJSON;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the AvlInformation interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfAvlInformation(value) {
|
|
24
|
+
if (!('size' in value) || value['size'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function AvlInformationFromJSON(json) {
|
|
29
|
+
return AvlInformationFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function AvlInformationFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'size': json['size'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function AvlInformationToJSON(value) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'size': value['size'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=AvlInformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvlInformation.js","sourceRoot":"","sources":["../../../../../src/main/generated/openapi/models/AvlInformation.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;AAoBH,4DAGC;AAED,wDAEC;AAED,kEAQC;AAED,oDAQC;AA9BD;;GAEG;AACH,SAAgB,wBAAwB,CAAC,KAAa;IAClD,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACpE,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAgB,sBAAsB,CAAC,IAAS;IAC5C,OAAO,2BAA2B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC;AAED,SAAgB,2BAA2B,CAAC,IAAS,EAAE,mBAA4B;IAC/E,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO;QAEH,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;KACvB,CAAC;AACN,CAAC;AAED,SAAgB,oBAAoB,CAAC,KAA6B;IAC9D,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO;QAEH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;KACxB,CAAC;AACN,CAAC"}
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./Account"), exports);
|
|
20
|
+
__exportStar(require("./AvlInformation"), exports);
|
|
20
21
|
__exportStar(require("./AvlStateEntry"), exports);
|
|
21
22
|
__exportStar(require("./AvlStateValue"), exports);
|
|
22
23
|
__exportStar(require("./Block"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/main/generated/openapi/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,oBAAoB;AACpB,4CAA0B;AAC1B,kDAAgC;AAChC,kDAAgC;AAChC,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,wDAAsC;AACtC,oDAAkC;AAClC,4CAA0B;AAC1B,4CAA0B;AAC1B,wCAAsB;AACtB,2CAAyB;AACzB,0DAAwC;AACxC,0CAAwB;AACxB,oDAAkC;AAClC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/main/generated/openapi/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,oBAAoB;AACpB,4CAA0B;AAC1B,mDAAiC;AACjC,kDAAgC;AAChC,kDAAgC;AAChC,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,wDAAsC;AACtC,oDAAkC;AAClC,4CAA0B;AAC1B,4CAA0B;AAC1B,wCAAsB;AACtB,2CAAyB;AACzB,0DAAwC;AACxC,0CAAwB;AACxB,oDAAkC;AAClC,uDAAqC"}
|
package/target/main/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export * from "./generated/openapi/runtime";
|
|
2
2
|
export * from "./generated/openapi/apis/index";
|
|
3
3
|
export * from "./generated/openapi/models/index";
|
|
4
|
+
export { BlockchainTransactionClient } from "./transactionclient/BlockchainTransactionClient";
|
|
5
|
+
export { SignedTransaction } from "./transactionclient/SignedTransaction";
|
|
6
|
+
export { SenderAuthenticationKeyPair } from "./transactionclient/SenderAuthenticationKeyPair";
|
|
7
|
+
export { Transaction, TransactionTree, SentTransaction, SenderAuthentication, Hash, BlockchainAddress, Signature, } from "./transactionclient/types";
|
|
8
|
+
export { ConditionWaiter, ConditionWaiterImpl } from "./transactionclient/ConditionWaiter";
|
package/target/main/index.js
CHANGED
|
@@ -31,7 +31,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
31
31
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.ConditionWaiterImpl = exports.SenderAuthenticationKeyPair = exports.SignedTransaction = exports.BlockchainTransactionClient = void 0;
|
|
34
35
|
__exportStar(require("./generated/openapi/runtime"), exports);
|
|
35
36
|
__exportStar(require("./generated/openapi/apis/index"), exports);
|
|
36
37
|
__exportStar(require("./generated/openapi/models/index"), exports);
|
|
38
|
+
var BlockchainTransactionClient_1 = require("./transactionclient/BlockchainTransactionClient");
|
|
39
|
+
Object.defineProperty(exports, "BlockchainTransactionClient", { enumerable: true, get: function () { return BlockchainTransactionClient_1.BlockchainTransactionClient; } });
|
|
40
|
+
var SignedTransaction_1 = require("./transactionclient/SignedTransaction");
|
|
41
|
+
Object.defineProperty(exports, "SignedTransaction", { enumerable: true, get: function () { return SignedTransaction_1.SignedTransaction; } });
|
|
42
|
+
var SenderAuthenticationKeyPair_1 = require("./transactionclient/SenderAuthenticationKeyPair");
|
|
43
|
+
Object.defineProperty(exports, "SenderAuthenticationKeyPair", { enumerable: true, get: function () { return SenderAuthenticationKeyPair_1.SenderAuthenticationKeyPair; } });
|
|
44
|
+
var ConditionWaiter_1 = require("./transactionclient/ConditionWaiter");
|
|
45
|
+
Object.defineProperty(exports, "ConditionWaiterImpl", { enumerable: true, get: function () { return ConditionWaiter_1.ConditionWaiterImpl; } });
|
|
37
46
|
//# sourceMappingURL=index.js.map
|
package/target/main/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;;AAEH,8DAA4C;AAC5C,iEAA+C;AAC/C,mEAAiD;AAEjD,+FAA8F;AAArF,0IAAA,2BAA2B,OAAA;AACpC,2EAA0E;AAAjE,sHAAA,iBAAiB,OAAA;AAC1B,+FAA8F;AAArF,0IAAA,2BAA2B,OAAA;AAUpC,uEAA2F;AAAjE,sHAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { SenderAuthentication, SentTransaction, Transaction, TransactionTree } from "./types";
|
|
2
|
+
import { ChainControllerApi, ExecutedTransaction, ShardControllerApi } from "../generated/openapi";
|
|
3
|
+
import { ConditionWaiter } from "./ConditionWaiter";
|
|
4
|
+
import { SignedTransaction } from "./SignedTransaction";
|
|
5
|
+
/** A client that supports signing, sending and waiting for transactions on the blockchain. */
|
|
6
|
+
export declare class BlockchainTransactionClient {
|
|
7
|
+
private readonly authentication;
|
|
8
|
+
private readonly chainController;
|
|
9
|
+
private readonly shardController;
|
|
10
|
+
private readonly transactionValidityDuration;
|
|
11
|
+
private readonly spawnedEventTimeout;
|
|
12
|
+
private readonly currentTime;
|
|
13
|
+
private readonly conditionWaiter;
|
|
14
|
+
/**
|
|
15
|
+
* Default signed transaction vilidity time in milliseconds. This is three minutes in
|
|
16
|
+
* milliseconds.
|
|
17
|
+
*/
|
|
18
|
+
static readonly DEFAULT_TRANSACTION_VALIDITY_DURATION = 180000;
|
|
19
|
+
/**
|
|
20
|
+
* Default timeout for spawned event to be inclusion in a block. This is ten minutes in
|
|
21
|
+
* milliseconds.
|
|
22
|
+
*/
|
|
23
|
+
static readonly DEFAULT_SPAWNED_EVENT_TIMEOUT = 600000;
|
|
24
|
+
/**
|
|
25
|
+
* Default current time is system time.
|
|
26
|
+
*/
|
|
27
|
+
static readonly DEFAULT_CURRENT_TIME: () => number;
|
|
28
|
+
private constructor();
|
|
29
|
+
/**
|
|
30
|
+
* Create a blockchain transaction client.
|
|
31
|
+
* @param baseUrl the base url of the chain to connect to
|
|
32
|
+
* @param authentication authentication of the sender that will sign transactions
|
|
33
|
+
* @param transactionValidityInMillis the number of milliseconds a signed transaction is valid for
|
|
34
|
+
* inclusion in a block.
|
|
35
|
+
* @param spawnedEventTimeoutInMillis the number of milliseconds the client will wait for a
|
|
36
|
+
* spawned event to be included in a block before timing out.
|
|
37
|
+
* @returns A blockchain transaction client
|
|
38
|
+
*/
|
|
39
|
+
static create(baseUrl: string, authentication: SenderAuthentication, transactionValidityInMillis?: number, spawnedEventTimeoutInMillis?: number): BlockchainTransactionClient;
|
|
40
|
+
/**
|
|
41
|
+
* Create a blockchain transaction client used for testing.
|
|
42
|
+
* @param chainController the client used for communicating with the chain api
|
|
43
|
+
* @param shardController the client used for communicating with the shard api
|
|
44
|
+
* @param authentication authentication of the sender that will sign transactions
|
|
45
|
+
* @param transactionValidityDuration the number of milliseconds a signed transaction is valid for
|
|
46
|
+
* inclusion in a block.
|
|
47
|
+
* @param spawnedEventTimeout the number of milliseconds the client will wait for a
|
|
48
|
+
* spawned event to be included in a block before timing out. @param currentTime
|
|
49
|
+
* @param currentTime support for injecting custom time
|
|
50
|
+
* @param conditionWaiter support for injecting custom condition waiter
|
|
51
|
+
* @returns A blockchain transaction client
|
|
52
|
+
*/
|
|
53
|
+
static createForTest(chainController: ChainControllerApi, shardController: ShardControllerApi, authentication: SenderAuthentication, transactionValidityDuration: number, spawnedEventTimeout: number, currentTime: () => number, conditionWaiter: ConditionWaiter): BlockchainTransactionClient;
|
|
54
|
+
/**
|
|
55
|
+
* Sign a transaction in preparation for sending it to the blockchain. The signed transaction
|
|
56
|
+
* expires after {@link #transactionValidityDuration} millis or if the nonce of the signer
|
|
57
|
+
* changes.
|
|
58
|
+
* @param transaction the transaction to sign
|
|
59
|
+
* @param gasCost the amount of gas to allocate for executing the transaction.
|
|
60
|
+
* @param applicableUntil the latest time this transaction is allowed
|
|
61
|
+
* @returns a signed transaction corresponding to the passed transaction.
|
|
62
|
+
*/
|
|
63
|
+
sign(transaction: Transaction, gasCost: number, applicableUntil?: number): Promise<SignedTransaction>;
|
|
64
|
+
/**
|
|
65
|
+
* Sends a signed transaction to the blockchain for execution and inclusion in a block.
|
|
66
|
+
* @param signedTransaction the signed transaction to send.
|
|
67
|
+
* @returns a sent transaction corresponding to the signed transaction.
|
|
68
|
+
*/
|
|
69
|
+
send(signedTransaction: SignedTransaction): Promise<SentTransaction>;
|
|
70
|
+
/**
|
|
71
|
+
* Sign and send a transaction to the blockchain for execution.
|
|
72
|
+
* @param transaction the transaction to sign and send
|
|
73
|
+
* @param gasCost the amount of gas to allocate for executing the transaction.
|
|
74
|
+
* @returns a sent transaction corresponding to the signed transaction.
|
|
75
|
+
*/
|
|
76
|
+
signAndSend(transaction: Transaction, gasCost: number): Promise<SentTransaction>;
|
|
77
|
+
/**
|
|
78
|
+
* Waits for a sent transaction to be included in a block on the blockchain.
|
|
79
|
+
* @param sentTransaction a transaction that has been sent to the blockchain.
|
|
80
|
+
* @returns the executed state of the transaction.
|
|
81
|
+
*/
|
|
82
|
+
waitForInclusionInBlock(sentTransaction: SentTransaction): Promise<ExecutedTransaction>;
|
|
83
|
+
/**
|
|
84
|
+
* Recursively wait for the inclusion of all events spawned by the transaction and the
|
|
85
|
+
* transaction's events.
|
|
86
|
+
* @param transaction the transaction to wait for
|
|
87
|
+
* @returns the execution status for all recursive events spawned by the transaction.
|
|
88
|
+
*/
|
|
89
|
+
waitForSpawnedEvents(transaction: ExecutedTransaction | SentTransaction): Promise<TransactionTree>;
|
|
90
|
+
/**
|
|
91
|
+
* Try to ensure that the given transaction is included in a final block before the specified time
|
|
92
|
+
* has passed. Will try to resend the transaction until it has been included in a block or the
|
|
93
|
+
* specified time has passed. If the transaction has not been included, or we are unable to
|
|
94
|
+
* determine inclusion, due to network issues, an exception is thrown.
|
|
95
|
+
*
|
|
96
|
+
* <p>To determine that a tried transaction has not been included in a block, we must wait until
|
|
97
|
+
* the last valid block that could have included the transaction has been finalized. The caller of
|
|
98
|
+
* this function can specify the amount of time to wait for the last valid block after validity
|
|
99
|
+
* time of the tried transaction has expired.
|
|
100
|
+
* @param transaction The transaction to sign and send
|
|
101
|
+
* @param transactionGasCost The amount of gas to allocate for executing the transaction
|
|
102
|
+
* @param includeBefore The UTC timestamp after which the transaction will no longer tried to be
|
|
103
|
+
* sent
|
|
104
|
+
* @param lastValidBlockWaitTime The amount of time to wait for the last valid block that a tried
|
|
105
|
+
* transaction can be included in
|
|
106
|
+
* @returns The executed state of the transaction
|
|
107
|
+
* @throws ApiException on io error
|
|
108
|
+
*/
|
|
109
|
+
ensureInclusionInBlock(transaction: Transaction, transactionGasCost: number, includeBefore: number, lastValidBlockWaitTime?: number): Promise<ExecutedTransaction>;
|
|
110
|
+
private waitForExecutedTransaction;
|
|
111
|
+
private waitForLastPossibleBlockToInclude;
|
|
112
|
+
private waitForTransaction;
|
|
113
|
+
}
|