@partisiablockchain/abi-client 5.61.0 → 5.70.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 CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@partisiablockchain/abi-client",
3
- "version": "5.61.0",
3
+ "version": "5.70.0",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0",
6
6
  "dependencies": {
7
- "@partisiablockchain/blockchain-api-transaction-client": "5.50.0",
7
+ "@partisiablockchain/blockchain-api-transaction-client": "5.55.0",
8
8
  "@secata-public/bitmanipulation-ts": "3.1.0",
9
9
  "@types/bn.js": "^5.1.6",
10
10
  "@types/elliptic": "^6.4.18",
@@ -0,0 +1,4 @@
1
+ export declare const LOCAL_STATE_ACCOUNT: Buffer;
2
+ export declare const LOCAL_STATE_ACCOUNT_CONTRACT: Buffer;
3
+ export declare const GLOBAL_STATE: Buffer;
4
+ export declare const CONTEXT_FREE: Buffer;
@@ -0,0 +1,25 @@
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.CONTEXT_FREE = exports.GLOBAL_STATE = exports.LOCAL_STATE_ACCOUNT_CONTRACT = exports.LOCAL_STATE_ACCOUNT = void 0;
21
+ exports.LOCAL_STATE_ACCOUNT = Buffer.from("5042434142490a02000505000000000401000000114163636f756e74496e766f636174696f6e00000000010000000b536563726574566172496400000001000000067261775f69640301000000134576656e74537562736372697074696f6e496400000001000000067261775f696408010000000f45787465726e616c4576656e74496400000001000000067261775f6964080000003702000000106164645f636f696e5f62616c616e636500000000020000000673796d626f6c0b00000006616d6f756e741802000000136465647563745f636f696e5f62616c616e636501000000020000000673796d626f6c0b00000006616d6f756e741802000000156164645f6d70635f746f6b656e5f62616c616e6365020000000100000006616d6f756e740902000000186465647563745f6d70635f746f6b656e5f62616c616e6365030000000100000006616d6f756e740902000000186765745f7374616b65645f746f6b656e5f62616c616e6365040000000002000000107374616b655f746f6b656e735f6f6c64050000000100000006616d6f756e7409020000000d6173736f63696174655f6f6c64060000000200000006616d6f756e740900000007616464726573730d02000000286469736173736f63696174655f616c6c5f746f6b656e735f666f725f636f6e74726163745f6f6c64070000000100000010636f6e74726163745f616464726573730d0200000012756e7374616b655f746f6b656e735f6f6c64080000000100000006616d6f756e7409020000001d636f6c6c6563745f666565735f666f725f646973747269627574696f6e0900000000020000000f6275726e5f6d70635f746f6b656e730a000000020000000e616d6f756e745f746f5f6275726e0900000007616464726573730d0200000015696e6974696174655f77697468647261775f6f6c640b000000020000000b7472616e736665725f69641300000006616d6f756e74090200000010696e6974696174655f6465706f7369740c000000020000000b7472616e736665725f69641300000006616d6f756e7409020000000f636f6d6d69745f7472616e736665720d000000010000000b7472616e736665725f696413020000000e61626f72745f7472616e736665720e000000010000000b7472616e736665725f69641302000000166372656174655f76657374696e675f6163636f756e740f000000040000000e616d6f756e745f746f5f76657374090000001072656c656173655f6475726174696f6e090000001072656c656173655f696e74657276616c0900000016746f6b656e5f67656e65726174696f6e5f6576656e74090200000017636865636b5f7665737465645f746f6b656e735f6f6c641000000000020000001a636865636b5f70656e64696e675f756e7374616b65735f6f6c641100000000020000001a6d616b655f6163636f756e745f6e6f6e5f7374616b6561626c651200000000020000001c696e6974696174655f64656c65676174655f7374616b65735f6f6c6415000000030000000d64656c65676174696f6e5f69641300000006616d6f756e74090000000c636f756e7465725f706172740d0200000021696e6974696174655f726563656976655f64656c6567617465645f7374616b657316000000030000000d64656c65676174696f6e5f69641300000006616d6f756e74090000000c636f756e7465725f706172740d0200000025696e6974696174655f726574726163745f64656c6567617465645f7374616b65735f6f6c6417000000030000000d64656c65676174696f6e5f69641300000006616d6f756e74090000000c636f756e7465725f706172740d0200000020696e6974696174655f72657475726e5f64656c6567617465645f7374616b657318000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74090000000c636f756e7465725f706172740d0200000016636f6d6d69745f64656c65676174655f7374616b657319000000010000000e7472616e73616374696f6e5f696413020000001561626f72745f64656c65676174655f7374616b65731a000000010000000e7472616e73616374696f6e5f696413020000001b6163636570745f64656c6567617465645f7374616b65735f6f6c641b00000002000000056f776e65720d00000006616d6f756e7409020000001b7265647563655f64656c6567617465645f7374616b65735f6f6c641c00000002000000056f776e65720d00000006616d6f756e74090200000022696e6974696174655f62796f635f7472616e736665725f73656e6465725f6c6f6e671d000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74090000000b62796f635f73796d626f6c0b0200000025696e6974696174655f62796f635f7472616e736665725f726563697069656e745f6c6f6e671e000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74090000000b62796f635f73796d626f6c0b0200000021696e6974696174655f62796f635f7472616e736665725f73656e6465725f6f6c641f000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74180000000b62796f635f73796d626f6c0b0200000020696e6974696174655f62796f635f7472616e736665725f726563697069656e7420000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74180000000b62796f635f73796d626f6c0b02000000096173736f6369617465210000000200000006616d6f756e740900000010636f6e74726163745f616464726573730d020000000c6469736173736f6369617465220000000200000006616d6f756e740900000010636f6e74726163745f616464726573730d020000001a696e6974696174655f6963655f6173736f63696174655f6f6c6423000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e740900000010636f6e74726163745f616464726573730d020000001d696e6974696174655f6963655f6469736173736f63696174655f6f6c6424000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e740900000010636f6e74726163745f616464726573730d020000000a636f6d6d69745f69636525000000010000000e7472616e73616374696f6e5f696413020000000961626f72745f69636526000000010000000e7472616e73616374696f6e5f69641302000000116170706f696e745f637573746f6469616e27000000020000000673656e646572120d00000011637573746f6469616e5f616464726573730d020000001a63616e63656c5f6170706f696e7465645f637573746f6469616e28000000010000000673656e646572120d020000000f72657365745f637573746f6469616e29000000010000000673656e6465720d02000000146163636570745f637573746f6469616e736869702a000000010000000673656e6465720d020000000c7374616b655f746f6b656e732e000000020000000673656e646572120d00000006616d6f756e7409020000000e756e7374616b655f746f6b656e732f000000020000000673656e646572120d00000006616d6f756e740902000000246469736173736f63696174655f616c6c5f746f6b656e735f666f725f636f6e747261637430000000020000000673656e646572120d00000010636f6e74726163745f616464726573730d0200000011696e6974696174655f776974686472617731000000030000000673656e646572120d00000011746f6b656e5f7472616e736665725f69641300000006616d6f756e74090200000013636865636b5f7665737465645f746f6b656e7335000000010000000673656e646572120d0200000016636865636b5f70656e64696e675f756e7374616b657336000000010000000673656e646572120d0200000018696e6974696174655f64656c65676174655f7374616b657337000000040000000673656e646572120d0000000d64656c65676174696f6e5f69641300000006616d6f756e74090000000c636f756e7465725f706172740d0200000021696e6974696174655f726574726163745f64656c6567617465645f7374616b657339000000040000000673656e646572120d0000000d64656c65676174696f6e5f69641300000006616d6f756e74090000000c636f756e7465725f706172740d02000000176163636570745f64656c6567617465645f7374616b65733d000000030000000673656e646572120d000000056f776e65720d0000000d616d6f756e745f7374616b65640902000000177265647563655f64656c6567617465645f7374616b65733e000000030000000673656e646572120d000000056f776e65720d0000000d616d6f756e745f7374616b656409020000001d696e6974696174655f62796f635f7472616e736665725f73656e6465723f000000040000000673656e646572120d0000000e7472616e73616374696f6e5f69641300000006616d6f756e74180000000b62796f635f73796d626f6c0b0200000016696e6974696174655f6963655f6173736f636961746541000000040000000673656e646572120d0000000e7472616e73616374696f6e5f69641300000006616d6f756e740900000010636f6e74726163745f616464726573730d0200000019696e6974696174655f6963655f6469736173736f636961746542000000040000000673656e646572120d0000000e7472616e73616374696f6e5f69641300000006616d6f756e740900000010636f6e74726163745f616464726573730d010000000a696e697469616c697a65ffffffff0f000000000000", "hex");
22
+ exports.LOCAL_STATE_ACCOUNT_CONTRACT = Buffer.from("5042434142490a0200050500000000040100000012436f6e7472616374496e766f636174696f6e00000000010000000b536563726574566172496400000001000000067261775f69640301000000134576656e74537562736372697074696f6e496400000001000000067261775f696408010000000f45787465726e616c4576656e74496400000001000000067261775f6964080000000b020000001d696e6974696174655f62796f635f7472616e736665725f73656e6465721f000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74180000000673796d626f6c0b0200000020696e6974696174655f62796f635f7472616e736665725f726563697069656e7420000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e74180000000673796d626f6c0b020000000f636f6d6d69745f7472616e736665720d000000010000000e7472616e73616374696f6e5f696413020000000e61626f72745f7472616e736665720e000000010000000e7472616e73616374696f6e5f6964130200000016696e6974696174655f6963655f6173736f636961746541000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e7409000000076163636f756e740d0200000019696e6974696174655f6963655f6469736173736f636961746542000000030000000e7472616e73616374696f6e5f69641300000006616d6f756e7409000000076163636f756e740d020000000a636f6d6d69745f69636525000000010000000e7472616e73616374696f6e5f696413020000000961626f72745f69636526000000010000000e7472616e73616374696f6e5f696413020000001b696e6974696174655f6d70635f746f6b656e5f7769746864726177490000000300000009637573746f6469616e120d0000000e7472616e73616374696f6e5f69641300000006616d6f756e7409020000001a696e6974696174655f6d70635f746f6b656e5f6465706f73697412000000020000000e7472616e73616374696f6e5f69641300000006616d6f756e7409010000000a696e697469616c697a65ffffffff0f000000000000", "hex");
23
+ exports.GLOBAL_STATE = Buffer.from("5042434142490a02000505000000000401000000124163636f756e745374617465476c6f62616c00000000010000000b536563726574566172496400000001000000067261775f69640301000000134576656e74537562736372697074696f6e496400000001000000067261775f696408010000000f45787465726e616c4576656e74496400000001000000067261775f69640800000005020000001a7365745f6761735f70726963655f313030305f6e6574776f726b00000000010000000d6e65775f6761735f707269636508020000001a7365745f6761735f70726963655f313030305f73746f7261676501000000010000000d6e65775f6761735f70726963650802000000087365745f636f696e02000000030000000673796d626f6c0b00000014636f6e76657273696f6e5f6e756d657261746f720900000016636f6e76657273696f6e5f64656e6f6d696e61746f720902000000217365745f6761735f70726963655f666f725f313030305f6963655f7374616b657303000000010000000d6e65775f6761735f707269636508010000000a696e697469616c697a65ffffffff0f000000000000", "hex");
24
+ exports.CONTEXT_FREE = Buffer.from("5042434142490a020005050000000004010000000b436f6e746578744672656500000000010000000b536563726574566172496400000001000000067261775f69640301000000134576656e74537562736372697074696f6e496400000001000000067261775f696408010000000f45787465726e616c4576656e74496400000001000000067261775f69640800000003020000001d636f6c6c6563745f666565735f666f725f646973747269627574696f6e09000000010000000565706f6368090200000038636f6c6c6563745f736572766963655f616e645f696e6672617374727563747572655f666565735f666f725f646973747269627574696f6e14000000010000000565706f636809010000000a696e697469616c697a65ffffffff0f000000000000", "hex");
25
+ //# sourceMappingURL=AccountPluginInvocationDeserialization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountPluginInvocationDeserialization.js","sourceRoot":"","sources":["../../src/main/AccountPluginInvocationDeserialization.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEU,QAAA,mBAAmB,GAAW,MAAM,CAAC,IAAI,CACpD,k6NAAk6N,EACl6N,KAAK,CACN,CAAC;AAEW,QAAA,4BAA4B,GAAW,MAAM,CAAC,IAAI,CAC7D,0kDAA0kD,EAC1kD,KAAK,CACN,CAAC;AAEW,QAAA,YAAY,GAAW,MAAM,CAAC,IAAI,CAC7C,01BAA01B,EAC11B,KAAK,CACN,CAAC;AAEW,QAAA,YAAY,GAAW,MAAM,CAAC,IAAI,CAC7C,klBAAklB,EACllB,KAAK,CACN,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { BigEndianByteInput } from "@secata-public/bitmanipulation-ts";
2
+ import { RpcValueFn } from "./RpcValueFn";
3
+ import { BlockchainAddress } from "@partisiablockchain/blockchain-api-transaction-client";
4
+ export declare class AccountPluginInvocationReader {
5
+ private static readonly LOCAL_STATE_ACCOUNT_ABI;
6
+ private static readonly LOCAL_STATE_ACCOUNT_CONTRACT_ABI;
7
+ private static readonly GLOBAL_STATE_ABI;
8
+ private static readonly CONTEXT_FREE_ABI;
9
+ constructor();
10
+ deserializeContextFreeInvocation(input: BigEndianByteInput | Buffer): RpcValueFn;
11
+ deserializeLocalStateUpdate(address: BlockchainAddress | Buffer, input: BigEndianByteInput | Buffer): RpcValueFn;
12
+ deserializeGlobalStateUpdate(input: BigEndianByteInput | Buffer): RpcValueFn;
13
+ }
@@ -0,0 +1,47 @@
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.AccountPluginInvocationReader = void 0;
21
+ const AccountPluginInvocationDeserialization_1 = require("../AccountPluginInvocationDeserialization");
22
+ const AbiParser_1 = require("../parser/AbiParser");
23
+ const RpcReader_1 = require("./RpcReader");
24
+ const FnKinds_1 = require("../parser/FnKinds");
25
+ class AccountPluginInvocationReader {
26
+ constructor() { }
27
+ deserializeContextFreeInvocation(input) {
28
+ return new RpcReader_1.RpcReader(input, AccountPluginInvocationReader.CONTEXT_FREE_ABI, FnKinds_1.FnKinds.action).readRpc();
29
+ }
30
+ deserializeLocalStateUpdate(address, input) {
31
+ if (address.toString("hex").startsWith("00")) {
32
+ return new RpcReader_1.RpcReader(input, AccountPluginInvocationReader.LOCAL_STATE_ACCOUNT_ABI, FnKinds_1.FnKinds.action).readRpc();
33
+ }
34
+ else {
35
+ return new RpcReader_1.RpcReader(input, AccountPluginInvocationReader.LOCAL_STATE_ACCOUNT_CONTRACT_ABI, FnKinds_1.FnKinds.action).readRpc();
36
+ }
37
+ }
38
+ deserializeGlobalStateUpdate(input) {
39
+ return new RpcReader_1.RpcReader(input, AccountPluginInvocationReader.GLOBAL_STATE_ABI, FnKinds_1.FnKinds.action).readRpc();
40
+ }
41
+ }
42
+ exports.AccountPluginInvocationReader = AccountPluginInvocationReader;
43
+ AccountPluginInvocationReader.LOCAL_STATE_ACCOUNT_ABI = new AbiParser_1.AbiParser(AccountPluginInvocationDeserialization_1.LOCAL_STATE_ACCOUNT).parseAbi();
44
+ AccountPluginInvocationReader.LOCAL_STATE_ACCOUNT_CONTRACT_ABI = new AbiParser_1.AbiParser(AccountPluginInvocationDeserialization_1.LOCAL_STATE_ACCOUNT_CONTRACT).parseAbi();
45
+ AccountPluginInvocationReader.GLOBAL_STATE_ABI = new AbiParser_1.AbiParser(AccountPluginInvocationDeserialization_1.GLOBAL_STATE).parseAbi();
46
+ AccountPluginInvocationReader.CONTEXT_FREE_ABI = new AbiParser_1.AbiParser(AccountPluginInvocationDeserialization_1.CONTEXT_FREE).parseAbi();
47
+ //# sourceMappingURL=AccountPluginInvocationReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountPluginInvocationReader.js","sourceRoot":"","sources":["../../../src/main/rpc/AccountPluginInvocationReader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAKH,sGAKmD;AACnD,mDAAgD;AAChD,2CAAwC;AACxC,+CAA4C;AAG5C,MAAa,6BAA6B;IAUxC,gBAAsB,CAAC;IAEhB,gCAAgC,CAAC,KAAkC;QACxE,OAAO,IAAI,qBAAS,CAClB,KAAK,EACL,6BAA6B,CAAC,gBAAgB,EAC9C,iBAAO,CAAC,MAAM,CACf,CAAC,OAAO,EAAE,CAAC;IACd,CAAC;IAEM,2BAA2B,CAChC,OAAmC,EACnC,KAAkC;QAElC,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7C,OAAO,IAAI,qBAAS,CAClB,KAAK,EACL,6BAA6B,CAAC,uBAAuB,EACrD,iBAAO,CAAC,MAAM,CACf,CAAC,OAAO,EAAE,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,qBAAS,CAClB,KAAK,EACL,6BAA6B,CAAC,gCAAgC,EAC9D,iBAAO,CAAC,MAAM,CACf,CAAC,OAAO,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IAEM,4BAA4B,CAAC,KAAkC;QACpE,OAAO,IAAI,qBAAS,CAClB,KAAK,EACL,6BAA6B,CAAC,gBAAgB,EAC9C,iBAAO,CAAC,MAAM,CACf,CAAC,OAAO,EAAE,CAAC;IACd,CAAC;;AA7CH,sEA8CC;AA7CyB,qDAAuB,GAAY,IAAI,qBAAS,CACtE,4DAAmB,CACpB,CAAC,QAAQ,EAAE,CAAC;AACW,8DAAgC,GAAY,IAAI,qBAAS,CAC/E,qEAA4B,CAC7B,CAAC,QAAQ,EAAE,CAAC;AACW,8CAAgB,GAAY,IAAI,qBAAS,CAAC,qDAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;AACnE,8CAAgB,GAAY,IAAI,qBAAS,CAAC,qDAAY,CAAC,CAAC,QAAQ,EAAE,CAAC"}