@alephium/web3 0.36.1 → 0.38.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/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +6 -1
- package/dist/src/api/api-alephium.js +1 -1
- package/dist/src/api/types.d.ts +1 -1
- package/dist/src/codec/array-codec.d.ts +17 -0
- package/dist/src/codec/array-codec.js +59 -0
- package/dist/src/codec/asset-output-codec.d.ts +27 -0
- package/dist/src/codec/asset-output-codec.js +135 -0
- package/dist/src/codec/bigint-codec.d.ts +5 -0
- package/dist/src/codec/bigint-codec.js +86 -0
- package/dist/src/codec/bytestring-codec.d.ts +16 -0
- package/dist/src/codec/bytestring-codec.js +50 -0
- package/dist/src/codec/codec.d.ts +8 -0
- package/dist/src/codec/codec.js +9 -0
- package/dist/src/codec/compact-int-codec.d.ts +51 -0
- package/dist/src/codec/compact-int-codec.js +300 -0
- package/dist/src/codec/contract-codec.d.ts +23 -0
- package/dist/src/codec/contract-codec.js +81 -0
- package/dist/src/codec/contract-output-codec.d.ts +21 -0
- package/dist/src/codec/contract-output-codec.js +82 -0
- package/dist/src/codec/contract-output-ref-codec.d.ts +15 -0
- package/dist/src/codec/contract-output-ref-codec.js +38 -0
- package/dist/src/codec/either-codec.d.ts +17 -0
- package/dist/src/codec/either-codec.js +67 -0
- package/dist/src/codec/hash.d.ts +4 -0
- package/dist/src/codec/hash.js +23 -0
- package/dist/src/codec/index.d.ts +23 -0
- package/dist/src/codec/index.js +69 -0
- package/dist/src/codec/input-codec.d.ts +22 -0
- package/dist/src/codec/input-codec.js +71 -0
- package/dist/src/codec/instr-codec.d.ts +230 -0
- package/dist/src/codec/instr-codec.js +471 -0
- package/dist/src/codec/lockup-script-codec.d.ts +28 -0
- package/dist/src/codec/lockup-script-codec.js +80 -0
- package/dist/src/codec/long-codec.d.ts +9 -0
- package/dist/src/codec/long-codec.js +56 -0
- package/dist/src/codec/method-codec.d.ts +31 -0
- package/dist/src/codec/method-codec.js +78 -0
- package/dist/src/codec/option-codec.d.ts +15 -0
- package/dist/src/codec/option-codec.js +55 -0
- package/dist/src/codec/output-codec.d.ts +7 -0
- package/dist/src/codec/output-codec.js +26 -0
- package/dist/src/codec/script-codec.d.ts +16 -0
- package/dist/src/codec/script-codec.js +41 -0
- package/dist/src/codec/signature-codec.d.ts +14 -0
- package/dist/src/codec/signature-codec.js +19 -0
- package/dist/src/codec/signed-int-codec.d.ts +9 -0
- package/dist/src/codec/signed-int-codec.js +39 -0
- package/dist/src/codec/token-codec.d.ts +16 -0
- package/dist/src/codec/token-codec.js +46 -0
- package/dist/src/codec/transaction-codec.d.ts +27 -0
- package/dist/src/codec/transaction-codec.js +128 -0
- package/dist/src/codec/unlock-script-codec.d.ts +40 -0
- package/dist/src/codec/unlock-script-codec.js +170 -0
- package/dist/src/codec/unsigned-tx-codec.d.ts +30 -0
- package/dist/src/codec/unsigned-tx-codec.js +103 -0
- package/dist/src/contract/contract.d.ts +14 -8
- package/dist/src/contract/contract.js +205 -22
- package/dist/src/contract/ralph.d.ts +16 -0
- package/dist/src/contract/ralph.js +127 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -1
- package/package.json +5 -4
- package/src/api/api-alephium.ts +7 -1
- package/src/api/types.ts +1 -1
- package/src/codec/array-codec.ts +63 -0
- package/src/codec/asset-output-codec.ts +149 -0
- package/src/codec/bigint-codec.ts +92 -0
- package/src/codec/bytestring-codec.ts +56 -0
- package/src/codec/codec.ts +31 -0
- package/src/codec/compact-int-codec.ts +316 -0
- package/src/codec/contract-codec.ts +95 -0
- package/src/codec/contract-output-codec.ts +95 -0
- package/src/codec/contract-output-ref-codec.ts +42 -0
- package/src/codec/either-codec.ts +74 -0
- package/src/codec/hash.ts +35 -0
- package/src/codec/index.ts +41 -0
- package/src/codec/input-codec.ts +81 -0
- package/src/codec/instr-codec.ts +479 -0
- package/src/codec/lockup-script-codec.ts +99 -0
- package/src/codec/long-codec.ts +59 -0
- package/src/codec/method-codec.ts +97 -0
- package/src/codec/option-codec.ts +60 -0
- package/src/codec/output-codec.ts +26 -0
- package/src/codec/script-codec.ts +45 -0
- package/src/codec/signature-codec.ts +40 -0
- package/src/codec/signed-int-codec.ts +37 -0
- package/src/codec/token-codec.ts +51 -0
- package/src/codec/transaction-codec.ts +147 -0
- package/src/codec/unlock-script-codec.ts +194 -0
- package/src/codec/unsigned-tx-codec.ts +124 -0
- package/src/contract/contract.ts +299 -23
- package/src/contract/ralph.ts +140 -2
- package/src/index.ts +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './array-codec';
|
|
2
|
+
export * as assetOutput from './asset-output-codec';
|
|
3
|
+
export * from './bigint-codec';
|
|
4
|
+
export * from './bytestring-codec';
|
|
5
|
+
export * from './codec';
|
|
6
|
+
export * from './compact-int-codec';
|
|
7
|
+
export * as contractOutput from './contract-output-codec';
|
|
8
|
+
export * from './contract-output-ref-codec';
|
|
9
|
+
export * from './either-codec';
|
|
10
|
+
export * from './input-codec';
|
|
11
|
+
export * from './instr-codec';
|
|
12
|
+
export * as lockupScript from './lockup-script-codec';
|
|
13
|
+
export * as unlockScript from './unlock-script-codec';
|
|
14
|
+
export * from './long-codec';
|
|
15
|
+
export * from './method-codec';
|
|
16
|
+
export * from './option-codec';
|
|
17
|
+
export * as script from './script-codec';
|
|
18
|
+
export * from './signature-codec';
|
|
19
|
+
export * from './signed-int-codec';
|
|
20
|
+
export * as token from './token-codec';
|
|
21
|
+
export * from './transaction-codec';
|
|
22
|
+
export * from './unsigned-tx-codec';
|
|
23
|
+
export * as contract from './contract-codec';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2018 - 2022 The Alephium Authors
|
|
4
|
+
This file is part of the alephium project.
|
|
5
|
+
|
|
6
|
+
The library is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
The library is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU Lesser General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
along with the library. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*/
|
|
19
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
22
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}) : (function(o, m, k, k2) {
|
|
27
|
+
if (k2 === undefined) k2 = k;
|
|
28
|
+
o[k2] = m[k];
|
|
29
|
+
}));
|
|
30
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
31
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
32
|
+
}) : function(o, v) {
|
|
33
|
+
o["default"] = v;
|
|
34
|
+
});
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.contract = exports.token = exports.script = exports.unlockScript = exports.lockupScript = exports.contractOutput = exports.assetOutput = void 0;
|
|
47
|
+
__exportStar(require("./array-codec"), exports);
|
|
48
|
+
exports.assetOutput = __importStar(require("./asset-output-codec"));
|
|
49
|
+
__exportStar(require("./bigint-codec"), exports);
|
|
50
|
+
__exportStar(require("./bytestring-codec"), exports);
|
|
51
|
+
__exportStar(require("./codec"), exports);
|
|
52
|
+
__exportStar(require("./compact-int-codec"), exports);
|
|
53
|
+
exports.contractOutput = __importStar(require("./contract-output-codec"));
|
|
54
|
+
__exportStar(require("./contract-output-ref-codec"), exports);
|
|
55
|
+
__exportStar(require("./either-codec"), exports);
|
|
56
|
+
__exportStar(require("./input-codec"), exports);
|
|
57
|
+
__exportStar(require("./instr-codec"), exports);
|
|
58
|
+
exports.lockupScript = __importStar(require("./lockup-script-codec"));
|
|
59
|
+
exports.unlockScript = __importStar(require("./unlock-script-codec"));
|
|
60
|
+
__exportStar(require("./long-codec"), exports);
|
|
61
|
+
__exportStar(require("./method-codec"), exports);
|
|
62
|
+
__exportStar(require("./option-codec"), exports);
|
|
63
|
+
exports.script = __importStar(require("./script-codec"));
|
|
64
|
+
__exportStar(require("./signature-codec"), exports);
|
|
65
|
+
__exportStar(require("./signed-int-codec"), exports);
|
|
66
|
+
exports.token = __importStar(require("./token-codec"));
|
|
67
|
+
__exportStar(require("./transaction-codec"), exports);
|
|
68
|
+
__exportStar(require("./unsigned-tx-codec"), exports);
|
|
69
|
+
exports.contract = __importStar(require("./contract-codec"));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Buffer } from 'buffer/';
|
|
2
|
+
import { Parser } from 'binary-parser';
|
|
3
|
+
import { AssetInput } from '../api/api-alephium';
|
|
4
|
+
import { UnlockScript } from './unlock-script-codec';
|
|
5
|
+
import { Codec } from './codec';
|
|
6
|
+
import { ArrayCodec } from './array-codec';
|
|
7
|
+
export interface Input {
|
|
8
|
+
outputRef: {
|
|
9
|
+
hint: number;
|
|
10
|
+
key: Buffer;
|
|
11
|
+
};
|
|
12
|
+
unlockScript: UnlockScript;
|
|
13
|
+
}
|
|
14
|
+
export declare class InputCodec implements Codec<Input> {
|
|
15
|
+
parser: Parser;
|
|
16
|
+
encode(input: Input): Buffer;
|
|
17
|
+
decode(input: Buffer): Input;
|
|
18
|
+
static toAssetInputs(inputs: Input[]): AssetInput[];
|
|
19
|
+
static fromAssetInputs(inputs: AssetInput[]): Input[];
|
|
20
|
+
}
|
|
21
|
+
export declare const inputCodec: InputCodec;
|
|
22
|
+
export declare const inputsCodec: ArrayCodec<Input>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputsCodec = exports.inputCodec = exports.InputCodec = void 0;
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2018 - 2022 The Alephium Authors
|
|
6
|
+
This file is part of the alephium project.
|
|
7
|
+
|
|
8
|
+
The library is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
The library is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU Lesser General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
along with the library. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
const buffer_1 = require("buffer/");
|
|
22
|
+
const binary_parser_1 = require("binary-parser");
|
|
23
|
+
const utils_1 = require("../utils");
|
|
24
|
+
const unlock_script_codec_1 = require("./unlock-script-codec");
|
|
25
|
+
const signed_int_codec_1 = require("./signed-int-codec");
|
|
26
|
+
const array_codec_1 = require("./array-codec");
|
|
27
|
+
class InputCodec {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.parser = binary_parser_1.Parser.start()
|
|
30
|
+
.nest('outputRef', {
|
|
31
|
+
type: binary_parser_1.Parser.start().int32('hint').buffer('key', { length: 32 })
|
|
32
|
+
})
|
|
33
|
+
.nest('unlockScript', {
|
|
34
|
+
type: unlock_script_codec_1.unlockScriptCodec.parser
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
encode(input) {
|
|
38
|
+
return buffer_1.Buffer.concat([
|
|
39
|
+
buffer_1.Buffer.from([...signed_int_codec_1.signedIntCodec.encode(input.outputRef.hint), ...input.outputRef.key]),
|
|
40
|
+
unlock_script_codec_1.unlockScriptCodec.encode(input.unlockScript)
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
decode(input) {
|
|
44
|
+
return this.parser.parse(input);
|
|
45
|
+
}
|
|
46
|
+
static toAssetInputs(inputs) {
|
|
47
|
+
return inputs.map((input) => {
|
|
48
|
+
const hint = input.outputRef.hint;
|
|
49
|
+
const key = (0, utils_1.binToHex)(input.outputRef.key);
|
|
50
|
+
const unlockScript = unlock_script_codec_1.unlockScriptCodec.encode(input.unlockScript);
|
|
51
|
+
return {
|
|
52
|
+
outputRef: { hint, key },
|
|
53
|
+
unlockScript: unlockScript.toString('hex')
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
static fromAssetInputs(inputs) {
|
|
58
|
+
return inputs.map((input) => {
|
|
59
|
+
const hint = input.outputRef.hint;
|
|
60
|
+
const key = buffer_1.Buffer.from(input.outputRef.key, 'hex');
|
|
61
|
+
const unlockScript = unlock_script_codec_1.unlockScriptCodec.decode(buffer_1.Buffer.from(input.unlockScript, 'hex'));
|
|
62
|
+
return {
|
|
63
|
+
outputRef: { hint, key },
|
|
64
|
+
unlockScript
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.InputCodec = InputCodec;
|
|
70
|
+
exports.inputCodec = new InputCodec();
|
|
71
|
+
exports.inputsCodec = new array_codec_1.ArrayCodec(exports.inputCodec);
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { Buffer } from 'buffer/';
|
|
2
|
+
import { Parser } from 'binary-parser';
|
|
3
|
+
import { ArrayCodec, DecodedArray } from './array-codec';
|
|
4
|
+
import { DecodedCompactInt } from './compact-int-codec';
|
|
5
|
+
import { ByteString } from './bytestring-codec';
|
|
6
|
+
import { LockupScript } from './lockup-script-codec';
|
|
7
|
+
import { Codec } from './codec';
|
|
8
|
+
export interface InstrValue {
|
|
9
|
+
}
|
|
10
|
+
export interface InstrValueWithIndex extends InstrValue {
|
|
11
|
+
index: number;
|
|
12
|
+
}
|
|
13
|
+
export interface InstrValueWithCompactInt extends InstrValue {
|
|
14
|
+
value: DecodedCompactInt;
|
|
15
|
+
}
|
|
16
|
+
export interface ByteStringConst extends InstrValue {
|
|
17
|
+
value: ByteString;
|
|
18
|
+
}
|
|
19
|
+
export interface AddressConst extends InstrValue {
|
|
20
|
+
value: LockupScript;
|
|
21
|
+
}
|
|
22
|
+
export interface Debug extends InstrValue {
|
|
23
|
+
stringParts: DecodedArray<ByteString>;
|
|
24
|
+
}
|
|
25
|
+
export interface CreateMapEntryValue extends InstrValue {
|
|
26
|
+
immFields: number;
|
|
27
|
+
mutFields: number;
|
|
28
|
+
}
|
|
29
|
+
export interface Instr {
|
|
30
|
+
code: number;
|
|
31
|
+
value: InstrValue;
|
|
32
|
+
}
|
|
33
|
+
export declare const CallLocal: (index: number) => Instr;
|
|
34
|
+
export declare const CallExternal: (index: number) => Instr;
|
|
35
|
+
export declare const Return: Instr;
|
|
36
|
+
export declare const ConstTrue: Instr;
|
|
37
|
+
export declare const ConstFalse: Instr;
|
|
38
|
+
export declare const I256Const0: Instr;
|
|
39
|
+
export declare const I256Const1: Instr;
|
|
40
|
+
export declare const I256Const2: Instr;
|
|
41
|
+
export declare const I256Const3: Instr;
|
|
42
|
+
export declare const I256Const4: Instr;
|
|
43
|
+
export declare const I256Const5: Instr;
|
|
44
|
+
export declare const I256ConstN1: Instr;
|
|
45
|
+
export declare const U256Const0: Instr;
|
|
46
|
+
export declare const U256Const1: Instr;
|
|
47
|
+
export declare const U256Const2: Instr;
|
|
48
|
+
export declare const U256Const3: Instr;
|
|
49
|
+
export declare const U256Const4: Instr;
|
|
50
|
+
export declare const U256Const5: Instr;
|
|
51
|
+
export declare const I256Const: (value: DecodedCompactInt) => Instr;
|
|
52
|
+
export declare const U256Const: (value: DecodedCompactInt) => Instr;
|
|
53
|
+
export declare const ByteConst: (value: ByteString) => Instr;
|
|
54
|
+
export declare const AddressConst: (value: LockupScript) => Instr;
|
|
55
|
+
export declare const LoadLocal: (index: number) => Instr;
|
|
56
|
+
export declare const StoreLocal: (index: number) => Instr;
|
|
57
|
+
export declare const Pop: Instr;
|
|
58
|
+
export declare const BoolNot: Instr;
|
|
59
|
+
export declare const BoolAnd: Instr;
|
|
60
|
+
export declare const BoolOr: Instr;
|
|
61
|
+
export declare const BoolEq: Instr;
|
|
62
|
+
export declare const BoolNeq: Instr;
|
|
63
|
+
export declare const BoolToByteVec: Instr;
|
|
64
|
+
export declare const I256Add: Instr;
|
|
65
|
+
export declare const I256Sub: Instr;
|
|
66
|
+
export declare const I256Mul: Instr;
|
|
67
|
+
export declare const I256Div: Instr;
|
|
68
|
+
export declare const I256Mod: Instr;
|
|
69
|
+
export declare const I256Eq: Instr;
|
|
70
|
+
export declare const I256Neq: Instr;
|
|
71
|
+
export declare const I256Lt: Instr;
|
|
72
|
+
export declare const I256Le: Instr;
|
|
73
|
+
export declare const I256Gt: Instr;
|
|
74
|
+
export declare const I256Ge: Instr;
|
|
75
|
+
export declare const U256Add: Instr;
|
|
76
|
+
export declare const U256Sub: Instr;
|
|
77
|
+
export declare const U256Mul: Instr;
|
|
78
|
+
export declare const U256Div: Instr;
|
|
79
|
+
export declare const U256Mod: Instr;
|
|
80
|
+
export declare const U256Eq: Instr;
|
|
81
|
+
export declare const U256Neq: Instr;
|
|
82
|
+
export declare const U256Lt: Instr;
|
|
83
|
+
export declare const U256Le: Instr;
|
|
84
|
+
export declare const U256Gt: Instr;
|
|
85
|
+
export declare const U256Ge: Instr;
|
|
86
|
+
export declare const U256ModAdd: Instr;
|
|
87
|
+
export declare const U256ModSub: Instr;
|
|
88
|
+
export declare const U256ModMul: Instr;
|
|
89
|
+
export declare const U256BitAnd: Instr;
|
|
90
|
+
export declare const U256BitOr: Instr;
|
|
91
|
+
export declare const U256Xor: Instr;
|
|
92
|
+
export declare const U256SHL: Instr;
|
|
93
|
+
export declare const U256SHR: Instr;
|
|
94
|
+
export declare const I256ToU256: Instr;
|
|
95
|
+
export declare const I256ToByteVec: Instr;
|
|
96
|
+
export declare const U256ToI256: Instr;
|
|
97
|
+
export declare const U256ToByteVec: Instr;
|
|
98
|
+
export declare const ByteVecEq: Instr;
|
|
99
|
+
export declare const ByteVecNeq: Instr;
|
|
100
|
+
export declare const ByteVecSize: Instr;
|
|
101
|
+
export declare const ByteVecConcat: Instr;
|
|
102
|
+
export declare const AddressEq: Instr;
|
|
103
|
+
export declare const AddressNeq: Instr;
|
|
104
|
+
export declare const AddressToByteVec: Instr;
|
|
105
|
+
export declare const IsAssetAddress: Instr;
|
|
106
|
+
export declare const IsContractAddress: Instr;
|
|
107
|
+
export declare const Jump: (value: DecodedCompactInt) => Instr;
|
|
108
|
+
export declare const IfTrue: (value: DecodedCompactInt) => Instr;
|
|
109
|
+
export declare const IfFalse: (value: DecodedCompactInt) => Instr;
|
|
110
|
+
export declare const Assert: Instr;
|
|
111
|
+
export declare const Blake2b: Instr;
|
|
112
|
+
export declare const Keccak256: Instr;
|
|
113
|
+
export declare const Sha256: Instr;
|
|
114
|
+
export declare const Sha3: Instr;
|
|
115
|
+
export declare const VerifyTxSignature: Instr;
|
|
116
|
+
export declare const VerifySecP256K1: Instr;
|
|
117
|
+
export declare const VerifyED25519: Instr;
|
|
118
|
+
export declare const NetworkId: Instr;
|
|
119
|
+
export declare const BlockTimeStamp: Instr;
|
|
120
|
+
export declare const BlockTarget: Instr;
|
|
121
|
+
export declare const TxId: Instr;
|
|
122
|
+
export declare const TxInputAddressAt: Instr;
|
|
123
|
+
export declare const TxInputsSize: Instr;
|
|
124
|
+
export declare const VerifyAbsoluteLocktime: Instr;
|
|
125
|
+
export declare const VerifyRelativeLocktime: Instr;
|
|
126
|
+
export declare const Log1: Instr;
|
|
127
|
+
export declare const Log2: Instr;
|
|
128
|
+
export declare const Log3: Instr;
|
|
129
|
+
export declare const Log4: Instr;
|
|
130
|
+
export declare const Log5: Instr;
|
|
131
|
+
export declare const ByteVecSlice: Instr;
|
|
132
|
+
export declare const ByteVecToAddress: Instr;
|
|
133
|
+
export declare const Encode: Instr;
|
|
134
|
+
export declare const Zeros: Instr;
|
|
135
|
+
export declare const U256To1Byte: Instr;
|
|
136
|
+
export declare const U256To2Byte: Instr;
|
|
137
|
+
export declare const U256To4Byte: Instr;
|
|
138
|
+
export declare const U256To8Byte: Instr;
|
|
139
|
+
export declare const U256To16Byte: Instr;
|
|
140
|
+
export declare const U256To32Byte: Instr;
|
|
141
|
+
export declare const U256From1Byte: Instr;
|
|
142
|
+
export declare const U256From2Byte: Instr;
|
|
143
|
+
export declare const U256From4Byte: Instr;
|
|
144
|
+
export declare const U256From8Byte: Instr;
|
|
145
|
+
export declare const U256From16Byte: Instr;
|
|
146
|
+
export declare const U256From32Byte: Instr;
|
|
147
|
+
export declare const EthEcRecover: Instr;
|
|
148
|
+
export declare const Log6: Instr;
|
|
149
|
+
export declare const Log7: Instr;
|
|
150
|
+
export declare const Log8: Instr;
|
|
151
|
+
export declare const Log9: Instr;
|
|
152
|
+
export declare const ContractIdToAddress: Instr;
|
|
153
|
+
export declare const LoadLocalByIndex: Instr;
|
|
154
|
+
export declare const StoreLocalByIndex: Instr;
|
|
155
|
+
export declare const Dup: Instr;
|
|
156
|
+
export declare const AssertWithErrorCode: Instr;
|
|
157
|
+
export declare const Swap: Instr;
|
|
158
|
+
export declare const BlockHash: Instr;
|
|
159
|
+
export declare const DEBUG: (stringParts: DecodedArray<ByteString>) => Instr;
|
|
160
|
+
export declare const TxGasPrice: Instr;
|
|
161
|
+
export declare const TxGasAmount: Instr;
|
|
162
|
+
export declare const TxGasFee: Instr;
|
|
163
|
+
export declare const I256Exp: Instr;
|
|
164
|
+
export declare const U256Exp: Instr;
|
|
165
|
+
export declare const U256ModExp: Instr;
|
|
166
|
+
export declare const VerifyBIP340Schnorr: Instr;
|
|
167
|
+
export declare const GetSegragatedSignature: Instr;
|
|
168
|
+
export declare const MulModN: Instr;
|
|
169
|
+
export declare const AddModN: Instr;
|
|
170
|
+
export declare const U256ToString: Instr;
|
|
171
|
+
export declare const I256ToString: Instr;
|
|
172
|
+
export declare const BoolToString: Instr;
|
|
173
|
+
export declare const LoadMutField: (index: number) => Instr;
|
|
174
|
+
export declare const StoreMutField: (index: number) => Instr;
|
|
175
|
+
export declare const ApproveAlph: Instr;
|
|
176
|
+
export declare const ApproveToken: Instr;
|
|
177
|
+
export declare const AlphRemaining: Instr;
|
|
178
|
+
export declare const TokenRemaining: Instr;
|
|
179
|
+
export declare const IsPaying: Instr;
|
|
180
|
+
export declare const TransferAlph: Instr;
|
|
181
|
+
export declare const TransferAlphFromSelf: Instr;
|
|
182
|
+
export declare const TransferAlphToSelf: Instr;
|
|
183
|
+
export declare const TransferToken: Instr;
|
|
184
|
+
export declare const TransferTokenFromSelf: Instr;
|
|
185
|
+
export declare const TransferTokenToSelf: Instr;
|
|
186
|
+
export declare const CreateContract: Instr;
|
|
187
|
+
export declare const CreateContractWithToken: Instr;
|
|
188
|
+
export declare const CopyCreateContract: Instr;
|
|
189
|
+
export declare const DestroySelf: Instr;
|
|
190
|
+
export declare const SelfContractId: Instr;
|
|
191
|
+
export declare const SelfAddress: Instr;
|
|
192
|
+
export declare const CallerContractId: Instr;
|
|
193
|
+
export declare const CallerAddress: Instr;
|
|
194
|
+
export declare const IsCallerFromTxScript: Instr;
|
|
195
|
+
export declare const CallerInitialStateHash: Instr;
|
|
196
|
+
export declare const CallerCodeHash: Instr;
|
|
197
|
+
export declare const ContractInitialStateHash: Instr;
|
|
198
|
+
export declare const ContractInitialCodeHash: Instr;
|
|
199
|
+
export declare const MigrateSimple: Instr;
|
|
200
|
+
export declare const MigrateWithFields: Instr;
|
|
201
|
+
export declare const CopyCreateContractWithToken: Instr;
|
|
202
|
+
export declare const BurnToken: Instr;
|
|
203
|
+
export declare const LockApprovedAssets: Instr;
|
|
204
|
+
export declare const CreateSubContract: Instr;
|
|
205
|
+
export declare const CreateSubContractWithToken: Instr;
|
|
206
|
+
export declare const CopyCreateSubContract: Instr;
|
|
207
|
+
export declare const CopyCreateSubContractWithToken: Instr;
|
|
208
|
+
export declare const LoadMutFieldByIndex: Instr;
|
|
209
|
+
export declare const StoreMutFieldByIndex: Instr;
|
|
210
|
+
export declare const ContractExists: Instr;
|
|
211
|
+
export declare const CreateContractAndTransferToken: Instr;
|
|
212
|
+
export declare const CopyCreateContractAndTransferToken: Instr;
|
|
213
|
+
export declare const CreateSubContractAndTransferToken: Instr;
|
|
214
|
+
export declare const CopyCreateSubContractAndTransferToken: Instr;
|
|
215
|
+
export declare const NullContractAddress: Instr;
|
|
216
|
+
export declare const SubContractId: Instr;
|
|
217
|
+
export declare const SubContractIdOf: Instr;
|
|
218
|
+
export declare const AlphTokenId: Instr;
|
|
219
|
+
export declare const LoadImmField: (index: number) => Instr;
|
|
220
|
+
export declare const LoadImmFieldByIndex: Instr;
|
|
221
|
+
export declare const PayGasFee: Instr;
|
|
222
|
+
export declare const MinimalContractDeposit: Instr;
|
|
223
|
+
export declare const CreateMapEntry: (immFields: number, mutFields: number) => Instr;
|
|
224
|
+
export declare class InstrCodec implements Codec<Instr> {
|
|
225
|
+
parser: Parser;
|
|
226
|
+
encode(instr: Instr): Buffer;
|
|
227
|
+
decode(input: Buffer): Instr;
|
|
228
|
+
}
|
|
229
|
+
export declare const instrCodec: InstrCodec;
|
|
230
|
+
export declare const instrsCodec: ArrayCodec<Instr>;
|