starknet 4.12.0 → 4.13.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/.eslintrc +1 -0
- package/CHANGELOG.md +14 -0
- package/__tests__/account.test.ts +0 -2
- package/dist/index.d.ts +2683 -24
- package/dist/index.global.js +22994 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +4713 -53
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4655 -0
- package/dist/index.mjs.map +1 -0
- package/index.d.ts +2683 -24
- package/index.global.js +22994 -0
- package/index.global.js.map +1 -0
- package/index.js +4713 -53
- package/index.js.map +1 -0
- package/index.mjs +4655 -0
- package/index.mjs.map +1 -0
- package/package.json +8 -2
- package/src/account/default.ts +43 -8
- package/src/account/interface.ts +25 -2
- package/src/constants.ts +0 -1
- package/src/provider/default.ts +3 -0
- package/src/provider/interface.ts +2 -0
- package/src/provider/rpc.ts +4 -4
- package/src/provider/sequencer.ts +4 -1
- package/src/types/lib.ts +1 -1
- package/src/types/provider.ts +5 -0
- package/src/utils/ellipticCurve.ts +3 -1
- package/src/utils/fetchPonyfill.ts +3 -2
- package/src/utils/hash.ts +3 -2
- package/src/utils/number.ts +2 -2
- package/tsup.config.ts +10 -0
- package/account/default.d.ts +0 -30
- package/account/default.js +0 -526
- package/account/index.d.ts +0 -2
- package/account/index.js +0 -18
- package/account/interface.d.ts +0 -161
- package/account/interface.js +0 -27
- package/constants.d.ts +0 -36
- package/constants.js +0 -2067
- package/contract/contractFactory.d.ts +0 -31
- package/contract/contractFactory.js +0 -102
- package/contract/default.d.ts +0 -108
- package/contract/default.js +0 -640
- package/contract/index.d.ts +0 -3
- package/contract/index.js +0 -19
- package/contract/interface.d.ts +0 -80
- package/contract/interface.js +0 -9
- package/dist/account/default.d.ts +0 -30
- package/dist/account/default.js +0 -526
- package/dist/account/index.d.ts +0 -2
- package/dist/account/index.js +0 -18
- package/dist/account/interface.d.ts +0 -161
- package/dist/account/interface.js +0 -27
- package/dist/constants.d.ts +0 -36
- package/dist/constants.js +0 -2067
- package/dist/contract/contractFactory.d.ts +0 -31
- package/dist/contract/contractFactory.js +0 -102
- package/dist/contract/default.d.ts +0 -108
- package/dist/contract/default.js +0 -640
- package/dist/contract/index.d.ts +0 -3
- package/dist/contract/index.js +0 -19
- package/dist/contract/interface.d.ts +0 -80
- package/dist/contract/interface.js +0 -9
- package/dist/provider/default.d.ts +0 -37
- package/dist/provider/default.js +0 -207
- package/dist/provider/errors.d.ts +0 -9
- package/dist/provider/errors.js +0 -40
- package/dist/provider/index.d.ts +0 -7
- package/dist/provider/index.js +0 -24
- package/dist/provider/interface.d.ts +0 -203
- package/dist/provider/interface.js +0 -9
- package/dist/provider/rpc.d.ts +0 -86
- package/dist/provider/rpc.js +0 -605
- package/dist/provider/sequencer.d.ts +0 -79
- package/dist/provider/sequencer.js +0 -575
- package/dist/provider/utils.d.ts +0 -30
- package/dist/provider/utils.js +0 -84
- package/dist/signer/default.d.ts +0 -13
- package/dist/signer/default.js +0 -102
- package/dist/signer/index.d.ts +0 -2
- package/dist/signer/index.js +0 -18
- package/dist/signer/interface.d.ts +0 -60
- package/dist/signer/interface.js +0 -9
- package/dist/types/account.d.ts +0 -11
- package/dist/types/account.js +0 -2
- package/dist/types/api/index.d.ts +0 -10
- package/dist/types/api/index.js +0 -18
- package/dist/types/api/openrpc.d.ts +0 -572
- package/dist/types/api/openrpc.js +0 -45
- package/dist/types/api/rpc.d.ts +0 -43
- package/dist/types/api/rpc.js +0 -2
- package/dist/types/api/sequencer.d.ts +0 -320
- package/dist/types/api/sequencer.js +0 -2
- package/dist/types/contract.d.ts +0 -5
- package/dist/types/contract.js +0 -2
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.js +0 -35
- package/dist/types/lib.d.ts +0 -120
- package/dist/types/lib.js +0 -8
- package/dist/types/provider.d.ts +0 -99
- package/dist/types/provider.js +0 -2
- package/dist/types/signer.d.ts +0 -19
- package/dist/types/signer.js +0 -2
- package/dist/utils/address.d.ts +0 -5
- package/dist/utils/address.js +0 -41
- package/dist/utils/ellipticCurve.d.ts +0 -29
- package/dist/utils/ellipticCurve.js +0 -132
- package/dist/utils/encode.d.ts +0 -15
- package/dist/utils/encode.js +0 -96
- package/dist/utils/fetchPonyfill.d.ts +0 -2
- package/dist/utils/fetchPonyfill.js +0 -6
- package/dist/utils/hash.d.ts +0 -37
- package/dist/utils/hash.js +0 -162
- package/dist/utils/json.d.ts +0 -16
- package/dist/utils/json.js +0 -19
- package/dist/utils/merkle.d.ts +0 -10
- package/dist/utils/merkle.js +0 -89
- package/dist/utils/number.d.ts +0 -16
- package/dist/utils/number.js +0 -112
- package/dist/utils/provider.d.ts +0 -4
- package/dist/utils/provider.js +0 -38
- package/dist/utils/responseParser/index.d.ts +0 -11
- package/dist/utils/responseParser/index.js +0 -9
- package/dist/utils/responseParser/rpc.d.ts +0 -20
- package/dist/utils/responseParser/rpc.js +0 -44
- package/dist/utils/responseParser/sequencer.d.ts +0 -17
- package/dist/utils/responseParser/sequencer.js +0 -99
- package/dist/utils/shortString.d.ts +0 -4
- package/dist/utils/shortString.js +0 -26
- package/dist/utils/stark.d.ts +0 -16
- package/dist/utils/stark.js +0 -91
- package/dist/utils/transaction.d.ts +0 -20
- package/dist/utils/transaction.js +0 -79
- package/dist/utils/typedData/index.d.ts +0 -72
- package/dist/utils/typedData/index.js +0 -239
- package/dist/utils/typedData/types.d.ts +0 -32
- package/dist/utils/typedData/types.js +0 -2
- package/dist/utils/typedData/utils.d.ts +0 -8
- package/dist/utils/typedData/utils.js +0 -16
- package/dist/utils/uint256.d.ts +0 -11
- package/dist/utils/uint256.js +0 -28
- package/dist/utils/url.d.ts +0 -7
- package/dist/utils/url.js +0 -49
- package/provider/default.d.ts +0 -37
- package/provider/default.js +0 -207
- package/provider/errors.d.ts +0 -9
- package/provider/errors.js +0 -40
- package/provider/index.d.ts +0 -7
- package/provider/index.js +0 -24
- package/provider/interface.d.ts +0 -203
- package/provider/interface.js +0 -9
- package/provider/rpc.d.ts +0 -86
- package/provider/rpc.js +0 -605
- package/provider/sequencer.d.ts +0 -79
- package/provider/sequencer.js +0 -575
- package/provider/utils.d.ts +0 -30
- package/provider/utils.js +0 -84
- package/signer/default.d.ts +0 -13
- package/signer/default.js +0 -102
- package/signer/index.d.ts +0 -2
- package/signer/index.js +0 -18
- package/signer/interface.d.ts +0 -60
- package/signer/interface.js +0 -9
- package/types/account.d.ts +0 -11
- package/types/account.js +0 -2
- package/types/api/index.d.ts +0 -10
- package/types/api/index.js +0 -18
- package/types/api/openrpc.d.ts +0 -572
- package/types/api/openrpc.js +0 -45
- package/types/api/rpc.d.ts +0 -43
- package/types/api/rpc.js +0 -2
- package/types/api/sequencer.d.ts +0 -320
- package/types/api/sequencer.js +0 -2
- package/types/contract.d.ts +0 -5
- package/types/contract.js +0 -2
- package/types/index.d.ts +0 -7
- package/types/index.js +0 -35
- package/types/lib.d.ts +0 -120
- package/types/lib.js +0 -8
- package/types/provider.d.ts +0 -99
- package/types/provider.js +0 -2
- package/types/signer.d.ts +0 -19
- package/types/signer.js +0 -2
- package/utils/address.d.ts +0 -5
- package/utils/address.js +0 -41
- package/utils/ellipticCurve.d.ts +0 -29
- package/utils/ellipticCurve.js +0 -132
- package/utils/encode.d.ts +0 -15
- package/utils/encode.js +0 -96
- package/utils/fetchPonyfill.d.ts +0 -2
- package/utils/fetchPonyfill.js +0 -6
- package/utils/hash.d.ts +0 -37
- package/utils/hash.js +0 -162
- package/utils/json.d.ts +0 -16
- package/utils/json.js +0 -19
- package/utils/merkle.d.ts +0 -10
- package/utils/merkle.js +0 -89
- package/utils/number.d.ts +0 -16
- package/utils/number.js +0 -112
- package/utils/provider.d.ts +0 -4
- package/utils/provider.js +0 -38
- package/utils/responseParser/index.d.ts +0 -11
- package/utils/responseParser/index.js +0 -9
- package/utils/responseParser/rpc.d.ts +0 -20
- package/utils/responseParser/rpc.js +0 -44
- package/utils/responseParser/sequencer.d.ts +0 -17
- package/utils/responseParser/sequencer.js +0 -99
- package/utils/shortString.d.ts +0 -4
- package/utils/shortString.js +0 -26
- package/utils/stark.d.ts +0 -16
- package/utils/stark.js +0 -91
- package/utils/transaction.d.ts +0 -20
- package/utils/transaction.js +0 -79
- package/utils/typedData/index.d.ts +0 -72
- package/utils/typedData/index.js +0 -239
- package/utils/typedData/types.d.ts +0 -32
- package/utils/typedData/types.js +0 -2
- package/utils/typedData/utils.d.ts +0 -8
- package/utils/typedData/utils.js +0 -16
- package/utils/uint256.d.ts +0 -11
- package/utils/uint256.js +0 -28
- package/utils/url.d.ts +0 -7
- package/utils/url.js +0 -49
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AccountInterface } from '../account';
|
|
2
|
-
import { ProviderInterface } from '../provider';
|
|
3
|
-
import { Abi, CompiledContract, RawCalldata } from '../types';
|
|
4
|
-
import { Contract } from './default';
|
|
5
|
-
export declare class ContractFactory {
|
|
6
|
-
abi: Abi;
|
|
7
|
-
compiledContract: CompiledContract;
|
|
8
|
-
providerOrAccount: ProviderInterface | AccountInterface;
|
|
9
|
-
constructor(compiledContract: CompiledContract, providerOrAccount?: ProviderInterface | AccountInterface, abi?: Abi);
|
|
10
|
-
/**
|
|
11
|
-
* Deploys contract and returns new instance of the Contract
|
|
12
|
-
*
|
|
13
|
-
* @param constructorCalldata - Constructor Calldata
|
|
14
|
-
* @param addressSalt (optional) - Address Salt for deployment
|
|
15
|
-
* @returns deployed Contract
|
|
16
|
-
*/
|
|
17
|
-
deploy(constructorCalldata?: RawCalldata, addressSalt?: string | undefined): Promise<Contract>;
|
|
18
|
-
/**
|
|
19
|
-
* Attaches to new Provider or Account
|
|
20
|
-
*
|
|
21
|
-
* @param providerOrAccount - new Provider or Account to attach to
|
|
22
|
-
*/
|
|
23
|
-
connect(providerOrAccount: ProviderInterface | AccountInterface): ContractFactory;
|
|
24
|
-
/**
|
|
25
|
-
* Attaches current abi and provider or account to the new address
|
|
26
|
-
*
|
|
27
|
-
* @param address - Contract address
|
|
28
|
-
* @returns Contract
|
|
29
|
-
*/
|
|
30
|
-
attach(address: string): Contract;
|
|
31
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.ContractFactory = void 0;
|
|
43
|
-
var minimalistic_assert_1 = __importDefault(require("minimalistic-assert"));
|
|
44
|
-
var provider_1 = require("../provider");
|
|
45
|
-
var default_1 = require("./default");
|
|
46
|
-
var ContractFactory = /** @class */ (function () {
|
|
47
|
-
function ContractFactory(compiledContract, providerOrAccount, abi // abi can be different from the deployed contract ie for proxy contracts
|
|
48
|
-
) {
|
|
49
|
-
if (providerOrAccount === void 0) { providerOrAccount = provider_1.defaultProvider; }
|
|
50
|
-
if (abi === void 0) { abi = compiledContract.abi; }
|
|
51
|
-
this.abi = abi;
|
|
52
|
-
this.compiledContract = compiledContract;
|
|
53
|
-
this.providerOrAccount = providerOrAccount;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Deploys contract and returns new instance of the Contract
|
|
57
|
-
*
|
|
58
|
-
* @param constructorCalldata - Constructor Calldata
|
|
59
|
-
* @param addressSalt (optional) - Address Salt for deployment
|
|
60
|
-
* @returns deployed Contract
|
|
61
|
-
*/
|
|
62
|
-
ContractFactory.prototype.deploy = function (constructorCalldata, addressSalt) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
-
var _a, contract_address, transaction_hash, contractInstance;
|
|
65
|
-
return __generator(this, function (_b) {
|
|
66
|
-
switch (_b.label) {
|
|
67
|
-
case 0: return [4 /*yield*/, this.providerOrAccount.deployContract({
|
|
68
|
-
contract: this.compiledContract,
|
|
69
|
-
constructorCalldata: constructorCalldata,
|
|
70
|
-
addressSalt: addressSalt,
|
|
71
|
-
})];
|
|
72
|
-
case 1:
|
|
73
|
-
_a = _b.sent(), contract_address = _a.contract_address, transaction_hash = _a.transaction_hash;
|
|
74
|
-
(0, minimalistic_assert_1.default)(Boolean(contract_address), 'Deployment of the contract failed');
|
|
75
|
-
contractInstance = new default_1.Contract(this.compiledContract.abi, contract_address, this.providerOrAccount);
|
|
76
|
-
contractInstance.deployTransactionHash = transaction_hash;
|
|
77
|
-
return [2 /*return*/, contractInstance];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Attaches to new Provider or Account
|
|
84
|
-
*
|
|
85
|
-
* @param providerOrAccount - new Provider or Account to attach to
|
|
86
|
-
*/
|
|
87
|
-
ContractFactory.prototype.connect = function (providerOrAccount) {
|
|
88
|
-
this.providerOrAccount = providerOrAccount;
|
|
89
|
-
return this;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Attaches current abi and provider or account to the new address
|
|
93
|
-
*
|
|
94
|
-
* @param address - Contract address
|
|
95
|
-
* @returns Contract
|
|
96
|
-
*/
|
|
97
|
-
ContractFactory.prototype.attach = function (address) {
|
|
98
|
-
return new default_1.Contract(this.abi, address, this.providerOrAccount);
|
|
99
|
-
};
|
|
100
|
-
return ContractFactory;
|
|
101
|
-
}());
|
|
102
|
-
exports.ContractFactory = ContractFactory;
|
package/contract/default.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { AccountInterface } from '../account';
|
|
2
|
-
import { ProviderInterface } from '../provider';
|
|
3
|
-
import { BlockIdentifier } from '../provider/utils';
|
|
4
|
-
import { Abi, AbiEntry, Args, AsyncContractFunction, Call, Calldata, ContractFunction, InvokeFunctionResponse, Overrides, ParsedStruct, Result, StructAbi } from '../types';
|
|
5
|
-
import { BigNumberish } from '../utils/number';
|
|
6
|
-
import { ContractInterface } from './interface';
|
|
7
|
-
export declare class Contract implements ContractInterface {
|
|
8
|
-
abi: Abi;
|
|
9
|
-
address: string;
|
|
10
|
-
providerOrAccount: ProviderInterface | AccountInterface;
|
|
11
|
-
deployTransactionHash?: string;
|
|
12
|
-
protected readonly structs: {
|
|
13
|
-
[name: string]: StructAbi;
|
|
14
|
-
};
|
|
15
|
-
readonly functions: {
|
|
16
|
-
[name: string]: AsyncContractFunction;
|
|
17
|
-
};
|
|
18
|
-
readonly callStatic: {
|
|
19
|
-
[name: string]: AsyncContractFunction;
|
|
20
|
-
};
|
|
21
|
-
readonly populateTransaction: {
|
|
22
|
-
[name: string]: ContractFunction;
|
|
23
|
-
};
|
|
24
|
-
readonly estimateFee: {
|
|
25
|
-
[name: string]: ContractFunction;
|
|
26
|
-
};
|
|
27
|
-
readonly [key: string]: AsyncContractFunction | any;
|
|
28
|
-
/**
|
|
29
|
-
* Contract class to handle contract methods
|
|
30
|
-
*
|
|
31
|
-
* @param abi - Abi of the contract object
|
|
32
|
-
* @param address (optional) - address to connect to
|
|
33
|
-
* @param providerOrAccount (optional) - Provider or Account to attach to
|
|
34
|
-
*/
|
|
35
|
-
constructor(abi: Abi, address: string, providerOrAccount?: ProviderInterface | AccountInterface);
|
|
36
|
-
attach(address: string): void;
|
|
37
|
-
connect(providerOrAccount: ProviderInterface | AccountInterface): void;
|
|
38
|
-
deployed(): Promise<Contract>;
|
|
39
|
-
call(method: string, args?: Array<any>, { blockIdentifier, }?: {
|
|
40
|
-
blockIdentifier?: BlockIdentifier;
|
|
41
|
-
}): Promise<Result>;
|
|
42
|
-
invoke(method: string, args?: Array<any>, options?: Overrides): Promise<InvokeFunctionResponse>;
|
|
43
|
-
estimate(method: string, args?: Array<any>): Promise<import("../types").EstimateFeeResponse>;
|
|
44
|
-
populate(method: string, args?: Array<any>): Call;
|
|
45
|
-
/**
|
|
46
|
-
* Deep parse of the object that has been passed to the method
|
|
47
|
-
*
|
|
48
|
-
* @param struct - struct that needs to be calculated
|
|
49
|
-
* @return {number} - number of members for the given struct
|
|
50
|
-
*/
|
|
51
|
-
private calculateStructMembers;
|
|
52
|
-
/**
|
|
53
|
-
* Validates if all arguments that are passed to the method are corresponding to the ones in the abi
|
|
54
|
-
*
|
|
55
|
-
* @param type - type of the method
|
|
56
|
-
* @param method - name of the method
|
|
57
|
-
* @param args - arguments that are passed to the method
|
|
58
|
-
*/
|
|
59
|
-
protected validateMethodAndArgs(type: 'INVOKE' | 'CALL', method: string, args?: Array<any>): void;
|
|
60
|
-
/**
|
|
61
|
-
* Deep parse of the object that has been passed to the method
|
|
62
|
-
*
|
|
63
|
-
* @param element - element that needs to be parsed
|
|
64
|
-
* @param type - name of the method
|
|
65
|
-
* @return {string | string[]} - parsed arguments in format that contract is expecting
|
|
66
|
-
*/
|
|
67
|
-
protected parseCalldataValue(element: ParsedStruct | BigNumberish | BigNumberish[], type: string): string | string[];
|
|
68
|
-
/**
|
|
69
|
-
* Parse of the response elements that are converted to Object (Struct) by using the abi
|
|
70
|
-
*
|
|
71
|
-
* @param responseIterator - iterator of the response
|
|
72
|
-
* @param type - type of the struct
|
|
73
|
-
* @return {BigNumberish | ParsedStruct} - parsed arguments in format that contract is expecting
|
|
74
|
-
*/
|
|
75
|
-
protected parseResponseStruct(responseIterator: Iterator<string>, type: string): BigNumberish | ParsedStruct;
|
|
76
|
-
/**
|
|
77
|
-
* Parse one field of the calldata by using input field from the abi for that method
|
|
78
|
-
*
|
|
79
|
-
* @param args - value of the field
|
|
80
|
-
* @param input - input(field) information from the abi that will be used to parse the data
|
|
81
|
-
* @return {string | string[]} - parsed arguments in format that contract is expecting
|
|
82
|
-
*/
|
|
83
|
-
protected parseCalldataField(argsIterator: Iterator<any>, input: AbiEntry): string | string[];
|
|
84
|
-
/**
|
|
85
|
-
* Parse the calldata by using input fields from the abi for that method
|
|
86
|
-
*
|
|
87
|
-
* @param args - arguments passed the the method
|
|
88
|
-
* @param inputs - list of inputs(fields) that are in the abi
|
|
89
|
-
* @return {Calldata} - parsed arguments in format that contract is expecting
|
|
90
|
-
*/
|
|
91
|
-
protected compileCalldata(args: Array<any>, inputs: AbiEntry[]): Calldata;
|
|
92
|
-
/**
|
|
93
|
-
* Parse elements of the response and structuring them into one field by using output property from the abi for that method
|
|
94
|
-
*
|
|
95
|
-
* @param responseIterator - iterator of the response
|
|
96
|
-
* @param output - output(field) information from the abi that will be used to parse the data
|
|
97
|
-
* @return - parsed response corresponding to the abi structure of the field
|
|
98
|
-
*/
|
|
99
|
-
protected parseResponseField(responseIterator: Iterator<string>, output: AbiEntry, parsedResult?: Args): any;
|
|
100
|
-
/**
|
|
101
|
-
* Parse elements of the response array and structuring them into response object
|
|
102
|
-
*
|
|
103
|
-
* @param method - method name
|
|
104
|
-
* @param response - response from the method
|
|
105
|
-
* @return - parsed response corresponding to the abi
|
|
106
|
-
*/
|
|
107
|
-
protected parseResponse(method: string, response: string[]): Result;
|
|
108
|
-
}
|