@thruputchain/client 0.25.0 → 0.26.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/LICENSE +1 -1
- package/README.md +58 -40
- package/dist/{actions-DxJZ3yIv.cjs → actions-CXx6qzsv.cjs} +161 -5
- package/dist/actions-CXx6qzsv.cjs.map +1 -0
- package/dist/{actions-CdFSUTO2.js → actions-QHgiCqT6.js} +139 -7
- package/dist/actions-QHgiCqT6.js.map +1 -0
- package/dist/actions.cjs +6 -2
- package/dist/actions.d.cts +4 -4
- package/dist/actions.d.ts +4 -4
- package/dist/actions.js +3 -3
- package/dist/artifact-BM_MVzhL.d.cts +35 -0
- package/dist/artifact-BM_MVzhL.d.cts.map +1 -0
- package/dist/artifact-BM_MVzhL.d.ts +35 -0
- package/dist/artifact-BM_MVzhL.d.ts.map +1 -0
- package/dist/{client-BxB6ktQd.d.cts → client-JixxskeH.d.cts} +58 -2
- package/dist/client-JixxskeH.d.cts.map +1 -0
- package/dist/{client-BxB6ktQd.d.ts → client-JixxskeH.d.ts} +58 -2
- package/dist/client-JixxskeH.d.ts.map +1 -0
- package/dist/{codec-CX-19jac.js → codec-BHKoSaOP.js} +1426 -50
- package/dist/{codec-CX-19jac.js.map → codec-BHKoSaOP.js.map} +1 -1
- package/dist/{codec-B7HJjMzI.cjs → codec-C3OlYm98.cjs} +1426 -50
- package/dist/{codec-B7HJjMzI.cjs.map → codec-C3OlYm98.cjs.map} +1 -1
- package/dist/{contract-D0wCFcAN.cjs → contract-C7T2H2Oi.cjs} +742 -333
- package/dist/contract-C7T2H2Oi.cjs.map +1 -0
- package/dist/{contract-BpxjDMHw.js → contract-DzvyyFCI.js} +712 -345
- package/dist/contract-DzvyyFCI.js.map +1 -0
- package/dist/contract.cjs +6 -1
- package/dist/contract.d.cts +4 -3
- package/dist/contract.d.ts +4 -3
- package/dist/contract.js +2 -2
- package/dist/contracts.cjs +3 -3
- package/dist/contracts.d.cts +3 -3
- package/dist/contracts.d.ts +3 -3
- package/dist/contracts.js +3 -3
- package/dist/{dev_wallet-C9eMQROk.js → dev_wallet-CSMA1PCt.js} +2 -2
- package/dist/{dev_wallet-C9eMQROk.js.map → dev_wallet-CSMA1PCt.js.map} +1 -1
- package/dist/{dev_wallet-BXWK5KR6.cjs → dev_wallet-GX-NCAFk.cjs} +2 -2
- package/dist/{dev_wallet-BXWK5KR6.cjs.map → dev_wallet-GX-NCAFk.cjs.map} +1 -1
- package/dist/{execution-DyxaIG4v.d.cts → execution-DYqPDn4O.d.cts} +3 -3
- package/dist/{execution-DyxaIG4v.d.cts.map → execution-DYqPDn4O.d.cts.map} +1 -1
- package/dist/{execution-CRDyKu45.d.ts → execution-Dj6E4B_b.d.ts} +3 -3
- package/dist/{execution-CRDyKu45.d.ts.map → execution-Dj6E4B_b.d.ts.map} +1 -1
- package/dist/index-1-rFirYe.d.cts +90 -0
- package/dist/index-1-rFirYe.d.cts.map +1 -0
- package/dist/{index-BZ0O5jZG.d.cts → index-BraLWObY.d.cts} +3 -2
- package/dist/{index-BZ0O5jZG.d.cts.map → index-BraLWObY.d.cts.map} +1 -1
- package/dist/{index-sAzHHayu.d.ts → index-ByvV2UF6.d.ts} +3 -2
- package/dist/{index-sAzHHayu.d.ts.map → index-ByvV2UF6.d.ts.map} +1 -1
- package/dist/{index-DOEBWXY2.d.cts → index-CG2WRtGa.d.cts} +31 -4
- package/dist/index-CG2WRtGa.d.cts.map +1 -0
- package/dist/{index-C-M-4jMR.d.cts → index-CVrhB9Dr.d.cts} +4 -4
- package/dist/{index-C-M-4jMR.d.cts.map → index-CVrhB9Dr.d.cts.map} +1 -1
- package/dist/{index-C97zw2rk.d.ts → index-D89ur7mO.d.ts} +31 -4
- package/dist/index-D89ur7mO.d.ts.map +1 -0
- package/dist/index-SV-inhhO.d.ts +90 -0
- package/dist/index-SV-inhhO.d.ts.map +1 -0
- package/dist/{index-CXuO2Zjx.d.ts → index-dJ65V8se.d.ts} +4 -4
- package/dist/{index-CXuO2Zjx.d.ts.map → index-dJ65V8se.d.ts.map} +1 -1
- package/dist/index.cjs +20 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -53
- package/dist/index.js.map +1 -1
- package/dist/{readError-BVbfTMLv.cjs → readError-AoNjzW75.cjs} +2 -2
- package/dist/{readError-BVbfTMLv.cjs.map → readError-AoNjzW75.cjs.map} +1 -1
- package/dist/{readError-Dn_XN98x.js → readError-CZPYcW__.js} +2 -2
- package/dist/{readError-Dn_XN98x.js.map → readError-CZPYcW__.js.map} +1 -1
- package/dist/{readViews-BKJtE5J3.d.cts → readViews-DJyqc7im.d.cts} +14 -4
- package/dist/readViews-DJyqc7im.d.cts.map +1 -0
- package/dist/{readViews-C_FX8wby.d.ts → readViews-DQoaUORa.d.ts} +14 -4
- package/dist/readViews-DQoaUORa.d.ts.map +1 -0
- package/dist/{sendInvocation-C4ruTC-9.js → sendInvocation-BwabRa2N.js} +5 -5
- package/dist/{sendInvocation-C4ruTC-9.js.map → sendInvocation-BwabRa2N.js.map} +1 -1
- package/dist/{sendInvocation-2EZanZZr.cjs → sendInvocation-qO8AZcmU.cjs} +5 -5
- package/dist/{sendInvocation-2EZanZZr.cjs.map → sendInvocation-qO8AZcmU.cjs.map} +1 -1
- package/dist/signed-op.cjs +2 -2
- package/dist/signed-op.d.cts +1 -1
- package/dist/signed-op.d.ts +1 -1
- package/dist/signed-op.js +2 -2
- package/dist/{signedOp-x4fakrr4.js → signedOp-C52gOgpR.js} +3 -3
- package/dist/{signedOp-x4fakrr4.js.map → signedOp-C52gOgpR.js.map} +1 -1
- package/dist/{signedOp-Bluo0OAd.cjs → signedOp-oqAXEqmE.cjs} +3 -3
- package/dist/{signedOp-Bluo0OAd.cjs.map → signedOp-oqAXEqmE.cjs.map} +1 -1
- package/dist/{signed_op-BzVbBgv4.js → signed_op-BokEDWr-.js} +2 -2
- package/dist/{signed_op-BzVbBgv4.js.map → signed_op-BokEDWr-.js.map} +1 -1
- package/dist/{signed_op-DFgQ2yFj.d.ts → signed_op-C4lY_TCc.d.ts} +3 -3
- package/dist/{signed_op-DFgQ2yFj.d.ts.map → signed_op-C4lY_TCc.d.ts.map} +1 -1
- package/dist/{signed_op-LwxrDud8.d.cts → signed_op-DX5WuyEh.d.cts} +3 -3
- package/dist/{signed_op-LwxrDud8.d.cts.map → signed_op-DX5WuyEh.d.cts.map} +1 -1
- package/dist/{signed_op-z_8fqAi1.cjs → signed_op-q8KKSm5e.cjs} +2 -2
- package/dist/{signed_op-z_8fqAi1.cjs.map → signed_op-q8KKSm5e.cjs.map} +1 -1
- package/dist/{transport-DqyoNtUy.js → transport-CBFwAIIv.js} +31 -4
- package/dist/transport-CBFwAIIv.js.map +1 -0
- package/dist/{transport-B-P16rs6.cjs → transport-tWxKhXUt.cjs} +31 -4
- package/dist/transport-tWxKhXUt.cjs.map +1 -0
- package/dist/transport.cjs +3 -3
- package/dist/transport.d.cts +3 -3
- package/dist/transport.d.ts +3 -3
- package/dist/transport.js +3 -3
- package/dist/{wallet-CwWPYoHF.js → wallet-7RELuTkf.js} +3 -3
- package/dist/{wallet-CwWPYoHF.js.map → wallet-7RELuTkf.js.map} +1 -1
- package/dist/{wallet-Bthapk8i.cjs → wallet-T_JazXRc.cjs} +3 -3
- package/dist/{wallet-Bthapk8i.cjs.map → wallet-T_JazXRc.cjs.map} +1 -1
- package/dist/wallet.cjs +2 -2
- package/dist/wallet.d.cts +2 -2
- package/dist/wallet.d.ts +2 -2
- package/dist/wallet.js +2 -2
- package/package.json +4 -4
- package/dist/actions-CdFSUTO2.js.map +0 -1
- package/dist/actions-DxJZ3yIv.cjs.map +0 -1
- package/dist/client-BxB6ktQd.d.cts.map +0 -1
- package/dist/client-BxB6ktQd.d.ts.map +0 -1
- package/dist/contract-BpxjDMHw.js.map +0 -1
- package/dist/contract-D0wCFcAN.cjs.map +0 -1
- package/dist/index-BuPQcAK2.d.ts +0 -23
- package/dist/index-BuPQcAK2.d.ts.map +0 -1
- package/dist/index-C97zw2rk.d.ts.map +0 -1
- package/dist/index-DOEBWXY2.d.cts.map +0 -1
- package/dist/index-uQqRk9Ww.d.cts +0 -23
- package/dist/index-uQqRk9Ww.d.cts.map +0 -1
- package/dist/readViews-BKJtE5J3.d.cts.map +0 -1
- package/dist/readViews-C_FX8wby.d.ts.map +0 -1
- package/dist/transport-B-P16rs6.cjs.map +0 -1
- package/dist/transport-DqyoNtUy.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
|
|
2
|
-
const require_contract = require("./contract-
|
|
2
|
+
const require_contract = require("./contract-C7T2H2Oi.cjs");
|
|
3
3
|
let _thruputchain_protocol = require("@thruputchain/protocol");
|
|
4
4
|
_thruputchain_protocol = require_rolldown_runtime.__toESM(_thruputchain_protocol, 1);
|
|
5
5
|
let _thruputchain_contract_spec = require("@thruputchain/contract-spec");
|
|
@@ -172,4 +172,4 @@ Object.defineProperty(exports, "thruput_signed_op_if", {
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
//# sourceMappingURL=signed_op-
|
|
175
|
+
//# sourceMappingURL=signed_op-q8KKSm5e.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signed_op-
|
|
1
|
+
{"version":3,"file":"signed_op-q8KKSm5e.cjs","names":["__gh_contract_spec","__gh_protocol","__gh_protocol_utils"],"sources":["../src/contracts/signed_op.ts"],"sourcesContent":["// Generated from signed_op.spec.xdr - SignedOp interface v0.1.68\n// DO NOT EDIT. Re-run codegen to update.\n\nimport * as __gh_protocol from \"@thruputchain/protocol\";\nimport * as __gh_protocol_utils from \"@thruputchain/protocol/utils\";\nimport * as __gh_contract_spec from \"@thruputchain/contract-spec\";\nimport * as __gh_client_contract from \"../contract/index.js\";\n\nconst __gh_s = __gh_contract_spec.contractSpecString;\n\nconst __gh_entrypoints = {\n SignedOp: {\n v0_1: {\n executeSignedOp: __gh_protocol.contractEntrypointID(\n __gh_protocol_utils.fromHex(\"c281dc2ffb5eeb1e\"),\n ),\n },\n },\n} as const;\n\nexport namespace thruput_signed_op_if {\n export namespace v0_1 {\n export interface Operation {\n block_expiry_height: bigint;\n nonce: bigint;\n body: globalThis.Uint8Array;\n }\n\n export namespace error {\n export type SignedOpError = 1n | 2n | 3n | 4n | 5n;\n }\n }\n}\n\nexport namespace SignedOp {\n export namespace v0_1 {\n export interface ExecuteSignedOpArgs {\n op: __gh_codegen.thruput_signed_op_if$v0_1$Operation;\n signature: __gh_client_contract.FixedBytes<64>;\n }\n export type ExecuteSignedOpResult = __gh_client_contract.SignedToken;\n\n export type DeclaredException = {\n kind: \"declared\";\n name: \"SignedOpError\";\n selector: 0xd7c6325a55793b51n;\n value: __gh_codegen.thruput_signed_op_if$v0_1$error$SignedOpError;\n };\n export type Exception =\n __gh_client_contract.ContractException<DeclaredException>;\n }\n}\n\nexport const spec: __gh_client_contract.ContractSpec = {\n interfaces: [\n {\n name: __gh_s(\"SignedOp\"),\n vers: __gh_s(\"0.1.68\"),\n throws: [\n {\n selector: 0xd7c6325a55793b51n,\n ty: {\n v: __gh_contract_spec.ContractTypeKind.Named,\n named: {\n crate_name: __gh_s(\"thruput-signed-op-if\"),\n major: __gh_s(\"0.1\"),\n module_path: __gh_s(\"thruput_signed_op_if::error\"),\n declared: __gh_s(\"SignedOpError\"),\n },\n },\n },\n ],\n methods: [\n {\n name: __gh_s(\"execute_signed_op\"),\n args: [\n {\n name: __gh_s(\"op\"),\n ty: {\n v: __gh_contract_spec.ContractTypeKind.Named,\n named: {\n crate_name: __gh_s(\"thruput-signed-op-if\"),\n major: __gh_s(\"0.1\"),\n module_path: __gh_s(\"thruput_signed_op_if\"),\n declared: __gh_s(\"Operation\"),\n },\n },\n },\n {\n name: __gh_s(\"signature\"),\n ty: {\n v: __gh_contract_spec.ContractTypeKind.Array,\n array: {\n element: { v: __gh_contract_spec.ContractTypeKind.U8 },\n len: 64n,\n },\n },\n },\n ],\n return_type: {\n v: __gh_contract_spec.ContractTypeKind.SignedToken,\n signed_token_preimage: { preimage_type: null },\n },\n effect: null,\n },\n ],\n },\n ],\n type_defs: [\n {\n v: __gh_contract_spec.ContractTypeDefKind.TypeDefStruct,\n struct_def: {\n name: {\n crate_name: __gh_s(\"thruput-signed-op-if\"),\n major: __gh_s(\"0.1\"),\n module_path: __gh_s(\"thruput_signed_op_if\"),\n declared: __gh_s(\"Operation\"),\n },\n fields: [\n {\n name: __gh_s(\"block_expiry_height\"),\n ty: { v: __gh_contract_spec.ContractTypeKind.I64 },\n },\n {\n name: __gh_s(\"nonce\"),\n ty: { v: __gh_contract_spec.ContractTypeKind.U64 },\n },\n {\n name: __gh_s(\"body\"),\n ty: {\n v: __gh_contract_spec.ContractTypeKind.Vector,\n vector: {\n element: { v: __gh_contract_spec.ContractTypeKind.U8 },\n max_len: 4294967295n,\n },\n },\n },\n ],\n },\n },\n {\n v: __gh_contract_spec.ContractTypeDefKind.TypeDefEnum,\n enum_def: {\n name: {\n crate_name: __gh_s(\"thruput-signed-op-if\"),\n major: __gh_s(\"0.1\"),\n module_path: __gh_s(\"thruput_signed_op_if::error\"),\n declared: __gh_s(\"SignedOpError\"),\n },\n variants: [\n { name: __gh_s(\"InvalidSignature\"), value: 1n },\n { name: __gh_s(\"Expired\"), value: 2n },\n { name: __gh_s(\"AlreadyConsumed\"), value: 3n },\n { name: __gh_s(\"MalformedBody\"), value: 4n },\n { name: __gh_s(\"NotYetExpired\"), value: 5n },\n ],\n },\n },\n ],\n events: [],\n};\n\nconst __gh_codecs = __gh_client_contract.createContractCodecContext(\n spec.type_defs,\n);\n\nexport const SignedOp = {\n v0_1: {\n executeSignedOp: __gh_client_contract.defineContractMethod<\n SignedOp.v0_1.ExecuteSignedOpArgs,\n SignedOp.v0_1.ExecuteSignedOpResult,\n SignedOp.v0_1.DeclaredException\n >({\n interfaceName: \"SignedOp\",\n interfaceVersion: \"0.1.68\",\n abiName: \"execute_signed_op\",\n publicName: \"executeSignedOp\",\n entrypoint: __gh_entrypoints.SignedOp.v0_1.executeSignedOp,\n effect: spec.interfaces[0]!.methods[0]!.effect,\n args: [\n {\n abiName: \"op\",\n publicName: \"op\",\n type: spec.interfaces[0]!.methods[0]!.args[0]!.ty,\n },\n {\n abiName: \"signature\",\n publicName: \"signature\",\n type: spec.interfaces[0]!.methods[0]!.args[1]!.ty,\n },\n ],\n returnType: spec.interfaces[0]!.methods[0]!.return_type,\n throws: [\n {\n selector: 0xd7c6325a55793b51n,\n name: \"SignedOpError\",\n type: spec.interfaces[0]!.throws[0]!.ty,\n },\n ],\n codecs: __gh_codecs,\n }),\n },\n} as const;\n\nexport const thruput_signed_op_if = {\n v0_1: {\n error: {\n SignedOpError: {\n InvalidSignature: 1n,\n Expired: 2n,\n AlreadyConsumed: 3n,\n MalformedBody: 4n,\n NotYetExpired: 5n,\n },\n },\n },\n} as const;\n\n// The types the namespaces above refer to, under names no declaration can capture.\nexport namespace __gh_codegen {\n export type thruput_signed_op_if$v0_1$Operation =\n thruput_signed_op_if.v0_1.Operation;\n export type thruput_signed_op_if$v0_1$error$SignedOpError =\n thruput_signed_op_if.v0_1.error.SignedOpError;\n}\n"],"mappings":";;;;;;;;;AAQA,MAAM,SAASA,4BAAmB;AAElC,MAAM,mBAAmB,EACvB,UAAU,EACR,MAAM,EACJ,iBAAiBC,uBAAc,qBAC7BC,6BAAoB,QAAQ,kBAAkB,CAChD,EACF,EACF,EACF;AAmCA,MAAa,OAA0C;CACrD,YAAY,CACV;EACE,MAAM,OAAO,UAAU;EACvB,MAAM,OAAO,QAAQ;EACrB,QAAQ,CACN;GACE,UAAU;GACV,IAAI;IACF,GAAGF,4BAAmB,iBAAiB;IACvC,OAAO;KACL,YAAY,OAAO,sBAAsB;KACzC,OAAO,OAAO,KAAK;KACnB,aAAa,OAA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Value } from "./codec-BHKoSaOP.js";
|
|
2
2
|
import { g as toBase58, n as fromHex0x } from "./hex-DIcaALXL.js";
|
|
3
3
|
import { t as hashSignedTransaction } from "./transactionHash-CO9ajbvU.js";
|
|
4
|
-
import { i as NativeRpcError } from "./readError-
|
|
4
|
+
import { c as JsonRpcError, i as NativeRpcError } from "./readError-CZPYcW__.js";
|
|
5
5
|
import { codec, deserialize } from "@thruputchain/protocol";
|
|
6
6
|
//#region src/transport/mock.ts
|
|
7
7
|
const methods = [
|
|
@@ -12,12 +12,16 @@ const methods = [
|
|
|
12
12
|
"getServerLimits",
|
|
13
13
|
"getBalance",
|
|
14
14
|
"getRegisteredAuth",
|
|
15
|
+
"getContractDeployment",
|
|
16
|
+
"getEffectiveContract",
|
|
17
|
+
"getContractArtifact",
|
|
15
18
|
"getBlockByHeight",
|
|
16
19
|
"dev_getPendingTransactionCount",
|
|
17
20
|
"simulateInvocation",
|
|
18
21
|
"simulateInvocations",
|
|
19
22
|
"sendTransaction",
|
|
20
23
|
"getTransactionReceipt",
|
|
24
|
+
"getTransactionInput",
|
|
21
25
|
"getTransactionStatus",
|
|
22
26
|
"getTransactionsByRootAddress",
|
|
23
27
|
"getTransactionsByBlock",
|
|
@@ -48,9 +52,12 @@ var MockTransport = class {
|
|
|
48
52
|
};
|
|
49
53
|
let result;
|
|
50
54
|
switch (method) {
|
|
55
|
+
case "getTransactionInput":
|
|
56
|
+
result = { status: "unavailable" };
|
|
57
|
+
break;
|
|
51
58
|
case "getVersionInfo":
|
|
52
59
|
result = {
|
|
53
|
-
wireFormat: "14.
|
|
60
|
+
wireFormat: "14.4.0",
|
|
54
61
|
implementation: "mock",
|
|
55
62
|
supportedMethods: [...methods]
|
|
56
63
|
};
|
|
@@ -103,6 +110,25 @@ var MockTransport = class {
|
|
|
103
110
|
stateBlockHeight
|
|
104
111
|
};
|
|
105
112
|
break;
|
|
113
|
+
case "getContractDeployment":
|
|
114
|
+
result = {
|
|
115
|
+
address: params.address,
|
|
116
|
+
stateBlockHeight,
|
|
117
|
+
deployment: null
|
|
118
|
+
};
|
|
119
|
+
break;
|
|
120
|
+
case "getEffectiveContract":
|
|
121
|
+
result = {
|
|
122
|
+
address: params.address,
|
|
123
|
+
context: params.context,
|
|
124
|
+
stateBlockHeight,
|
|
125
|
+
selection: null
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "getContractArtifact": throw new JsonRpcError(-32014, "Contract artifact unavailable", {
|
|
129
|
+
kind: "contractArtifactUnavailable",
|
|
130
|
+
hash: params.hash
|
|
131
|
+
}, method);
|
|
106
132
|
case "dev_getPendingTransactionCount":
|
|
107
133
|
result = { count: "0" };
|
|
108
134
|
break;
|
|
@@ -219,6 +245,7 @@ const NativeRpcErrorCode = {
|
|
|
219
245
|
BackendDataInvalid: -32054,
|
|
220
246
|
BackendTimeout: -32051,
|
|
221
247
|
BackendUnavailable: -32050,
|
|
248
|
+
ContractArtifactUnavailable: -32014,
|
|
222
249
|
FundingAttemptStopped: -32030,
|
|
223
250
|
HistoryUnavailable: -32013,
|
|
224
251
|
InvalidParams: -32602,
|
|
@@ -231,4 +258,4 @@ const NativeRpcErrorCode = {
|
|
|
231
258
|
//#endregion
|
|
232
259
|
export { txInvalidDetail as n, MockTransport as r, NativeRpcErrorCode as t };
|
|
233
260
|
|
|
234
|
-
//# sourceMappingURL=transport-
|
|
261
|
+
//# sourceMappingURL=transport-CBFwAIIv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport-CBFwAIIv.js","names":["#height","#blockHash","#transactions"],"sources":["../src/transport/mock.ts","../src/transport/txInvalidDetail.ts","../src/rpc/errors.ts"],"sourcesContent":["import type { Transport, RpcParams, TransportRequestOptions } from \"./types.js\";\nimport { codec, deserialize } from \"@thruputchain/protocol\";\nimport { toBase58 } from \"../encoding.js\";\nimport { fromHex0x } from \"../actions/hex.js\";\nimport { hashSignedTransaction } from \"../derivation/transactionHash.js\";\nimport { JsonRpcError } from \"./http.js\";\n\nconst methods = [\n \"getVersionInfo\",\n \"getNetworkInfo\",\n \"getChainTip\",\n \"getChainConfig\",\n \"getServerLimits\",\n \"getBalance\",\n \"getRegisteredAuth\",\n \"getContractDeployment\",\n \"getEffectiveContract\",\n \"getContractArtifact\",\n \"getBlockByHeight\",\n \"dev_getPendingTransactionCount\",\n \"simulateInvocation\",\n \"simulateInvocations\",\n \"sendTransaction\",\n \"getTransactionReceipt\",\n \"getTransactionInput\",\n \"getTransactionStatus\",\n \"getTransactionsByRootAddress\",\n \"getTransactionsByBlock\",\n \"getEvents\",\n \"getStorage\",\n \"faucet_requestAirdrop\",\n];\n/** Deterministic native RPC transport for examples; it does not execute contract code. */\nexport class MockTransport implements Transport {\n #height = 0n;\n #transactions = new Map<string, bigint>();\n async request<T = unknown>(\n method: string,\n params: RpcParams = {},\n options?: TransportRequestOptions,\n ): Promise<T> {\n options?.signal?.throwIfAborted();\n if (Array.isArray(params))\n throw new TypeError(\"Native RPC params must be a named object\");\n const stateBlockHeight = this.#height.toString();\n const bounds = {\n oldestIndexedBlockHeight: \"0\",\n latestIndexedBlockHeight: stateBlockHeight,\n nextCursor: null,\n };\n const simulation = {\n output: { result: \"return\", returnData: \"0x\" },\n events: [],\n gasUsed: \"0\",\n };\n let result: unknown;\n switch (method) {\n case \"getTransactionInput\":\n result = { status: \"unavailable\" };\n break;\n case \"getVersionInfo\":\n result = {\n wireFormat: \"14.4.0\",\n implementation: \"mock\",\n supportedMethods: [...methods],\n };\n break;\n case \"getNetworkInfo\":\n result = { networkHash: \"1\".repeat(32) };\n break;\n case \"getChainTip\":\n result = {\n blockHeight: stateBlockHeight,\n blockHash: this.#blockHash(this.#height),\n };\n break;\n case \"getChainConfig\":\n result = { stated: { maxNewContractsPerTx: 4 } };\n break;\n case \"getServerLimits\":\n result = {\n maxSimulationGas: \"100000000\",\n maxSimulationCalldataBytes: \"65536\",\n maxEventsPerPage: 200,\n maxTransactionsPerPage: 200,\n maxCursorBytes: \"1024\",\n simulationBatch: {\n maxInvocations: 16,\n maxCalldataBytes: 65536,\n maxGas: \"1600000000\",\n maxBackendResponseBytes: 1000000,\n timeoutMs: \"3000\",\n },\n };\n break;\n case \"getBalance\":\n result = { address: params.address, rawBalance: \"0\", stateBlockHeight };\n break;\n case \"getRegisteredAuth\":\n result = {\n address: params.address,\n configuration: null,\n stateBlockHeight,\n };\n break;\n case \"getStorage\":\n result = { item: null, stateBlockHeight };\n break;\n case \"getContractDeployment\":\n result = {\n address: params.address,\n stateBlockHeight,\n deployment: null,\n };\n break;\n case \"getEffectiveContract\":\n result = {\n address: params.address,\n context: params.context,\n stateBlockHeight,\n selection: null,\n };\n break;\n case \"getContractArtifact\":\n throw new JsonRpcError(\n -32014,\n \"Contract artifact unavailable\",\n {\n kind: \"contractArtifactUnavailable\",\n hash: params.hash,\n },\n method,\n );\n case \"dev_getPendingTransactionCount\":\n result = { count: \"0\" };\n break;\n case \"simulateInvocation\":\n result = { ...simulation, stateBlockHeight };\n break;\n case \"simulateInvocations\":\n result = {\n stateBlockHeight,\n results: (params.invocations as unknown[]).map(() =>\n structuredClone(simulation),\n ),\n };\n break;\n case \"faucet_requestAirdrop\":\n result = {\n attemptStatus: \"succeeded\",\n recipient: params.recipient,\n rawAmount: \"100000000\",\n transactionHash: this.#blockHash(this.#height),\n blockHeight: stateBlockHeight,\n execution: { result: \"return\", returnData: \"0x\" },\n };\n break;\n case \"sendTransaction\": {\n const signed = deserialize(\n fromHex0x(String(params.signedTransaction)),\n codec.SignedTransaction,\n );\n const hash = toBase58(hashSignedTransaction(signed));\n if (!this.#transactions.has(hash))\n this.#transactions.set(hash, ++this.#height);\n result = { transactionHash: hash, admission: \"accepted\" };\n break;\n }\n case \"getTransactionReceipt\": {\n const height = this.#transactions.get(String(params.transactionHash));\n result =\n height === undefined\n ? null\n : {\n transactionHash: params.transactionHash,\n blockHeight: height.toString(),\n execution: { result: \"return\", returnData: \"0x\" },\n events: [],\n gasUsed: \"0\",\n };\n break;\n }\n case \"getTransactionStatus\": {\n const height = this.#transactions.get(String(params.transactionHash));\n result =\n height === undefined\n ? { status: \"unknown\" }\n : { status: \"committed\", blockHeight: height.toString() };\n break;\n }\n case \"getEvents\":\n result = { ...bounds, events: [] };\n break;\n case \"getTransactionsByRootAddress\":\n case \"getTransactionsByBlock\":\n result = { ...bounds, transactions: [] };\n break;\n case \"getBlockByHeight\": {\n const height = BigInt(String(params.blockHeight));\n result =\n height <= 0n || height > this.#height\n ? null\n : {\n blockHash: this.#blockHash(height),\n protocol: 0,\n networkHash: \"1\".repeat(32),\n proposer: \"1\".repeat(32),\n blockTimepoint: \"0\",\n blockHeight: height.toString(),\n txsHash: this.#blockHash(height),\n storageHash: this.#blockHash(height),\n eventsHash: this.#blockHash(height),\n configHash: this.#blockHash(height),\n prevBlockHash: this.#blockHash(height - 1n),\n proposalTxsHash: this.#blockHash(height),\n upgrades: [],\n };\n break;\n }\n default:\n throw new Error(`MockTransport: method not implemented: ${method}`);\n }\n return result as T;\n }\n #blockHash(height: bigint): string {\n const bytes = new Uint8Array(32);\n new DataView(bytes.buffer).setBigUint64(24, height);\n return toBase58(bytes);\n }\n}\n","import { NativeRpcError } from \"../rpc/errorReader.js\";\nimport { UnsupportedRpcValue } from \"../rpc/codec.js\";\nimport type { RpcErrorData } from \"../rpc/generated.js\";\n/** A validated native admission bound violation. Unknown details remain on the raw error. */\nexport type TxInvalidDetail = Exclude<\n NonNullable<Extract<RpcErrorData, { kind: \"transactionInvalid\" }>[\"detail\"]>,\n UnsupportedRpcValue\n>;\n/** Read known transaction-bound evidence without inferring retry permission. */\nexport function txInvalidDetail(error: unknown): TxInvalidDetail | null {\n if (\n !(error instanceof NativeRpcError) ||\n error.decoded.classification !== \"known\" ||\n error.decoded.data.kind !== \"transactionInvalid\"\n )\n return null;\n const detail = error.decoded.data.detail;\n return !detail || detail instanceof UnsupportedRpcValue ? null : detail;\n}\n","// Generated from the Rust-owned native OpenRPC fixture. Do not edit.\n/** Native causes. Codes alone never grant write retry permission. */\nexport const NativeRpcErrorCode = {\n BackendDataInvalid: -32054,\n BackendTimeout: -32051,\n BackendUnavailable: -32050,\n ContractArtifactUnavailable: -32014,\n FundingAttemptStopped: -32030,\n HistoryUnavailable: -32013,\n InvalidParams: -32602,\n LocalFundingUnresolved: -32031,\n Overloaded: -32053,\n StateHeightUnavailable: -32012,\n TransactionInvalid: -32000,\n TransactionRejected: -32001,\n} as const;\n"],"mappings":";;;;;;AAOA,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAEA,IAAa,gBAAb,MAAgD;CAC9C,UAAU;CACV,gCAAgB,IAAI,IAAoB;CACxC,MAAM,QACJ,QACA,SAAoB,CAAC,GACrB,SACY;EACZ,SAAS,QAAQ,eAAe;EAChC,IAAI,MAAM,QAAQ,MAAM,GACtB,MAAM,IAAI,UAAU,0CAA0C;EAChE,MAAM,mBAAmB,KAAKA,QAAQ,SAAS;EAC/C,MAAM,SAAS;GACb,0BAA0B;GAC1B,0BAA0B;GAC1B,YAAY;EACd;EACA,MAAM,aAAa;GACjB,QAAQ;IAAE,QAAQ;IAAU,YAAY;GAAK;GAC7C,QAAQ,CAAC;GACT,SAAS;EACX;EACA,IAAI;EACJ,QAAQ,QAAR;GACE,KAAK;IACH,SAAS,EAAE,QAAQ,cAAc;IACjC;GACF,KAAK;IACH,SAAS;KACP,YAAY;KACZ,gBAAgB;KAChB,kBAAkB,CAAC,GAAG,OAAO;IAC/B;IACA;GACF,KAAK;IACH,SAAS,EAAE,aAAa,IAAI,OAAO,EAAE,EAAE;IACvC;GACF,KAAK;IACH,SAAS;KACP,aAAa;KACb,WAAW,KAAKC,WAAW,KAAKD,OAAO;IACzC;IACA;GACF,KAAK;IACH,SAAS,EAAE,QAAQ,EAAE,sBAAsB,EAAE,EAAE;IAC/C;GACF,KAAK;IACH,SAAS;KACP,kBA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D,OAAO,SAAS,KAAK;CACvB;AACF;;;;AC5NA,SAAgB,gBAAgB,OAAwC;CACtE,IACE,EAAE,iBAAiB,mBACnB,MAAM,QAAQ,mBAAmB,WACjC,MAAM,QAAQ,KAAK,SAAS,sBAE5B,OAAO;CACT,MAAM,SAAS,MAAM,QAAQ,KAAK;CAClC,OAAO,CAAC,UAAU,kBAAkB,sBAAsB,OAAO;AACnE;;;;AChBA,MAAa,qBAAqB;CAChC,oBAAoB;CACpB,gBAAgB;CAChB,oBAAoB;CACpB,6BAA6B;CAC7B,uBAAuB;CACvB,oBAAoB;CACpB,eAAe;CACf,wBAAwB;CACxB,YAAY;CACZ,wBAAwB;CACxB,oBAAoB;CACpB,qBAAqB;AACvB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_codec = require("./codec-
|
|
1
|
+
const require_codec = require("./codec-C3OlYm98.cjs");
|
|
2
2
|
const require_hex = require("./hex-DkGpiZ5e.cjs");
|
|
3
3
|
const require_transactionHash = require("./transactionHash-D5yf4KoL.cjs");
|
|
4
|
-
const require_readError = require("./readError-
|
|
4
|
+
const require_readError = require("./readError-AoNjzW75.cjs");
|
|
5
5
|
let _thruputchain_protocol = require("@thruputchain/protocol");
|
|
6
6
|
let _thruputchain_protocol_utils = require("@thruputchain/protocol/utils");
|
|
7
7
|
//#region src/transport/mock.ts
|
|
@@ -13,12 +13,16 @@ const methods = [
|
|
|
13
13
|
"getServerLimits",
|
|
14
14
|
"getBalance",
|
|
15
15
|
"getRegisteredAuth",
|
|
16
|
+
"getContractDeployment",
|
|
17
|
+
"getEffectiveContract",
|
|
18
|
+
"getContractArtifact",
|
|
16
19
|
"getBlockByHeight",
|
|
17
20
|
"dev_getPendingTransactionCount",
|
|
18
21
|
"simulateInvocation",
|
|
19
22
|
"simulateInvocations",
|
|
20
23
|
"sendTransaction",
|
|
21
24
|
"getTransactionReceipt",
|
|
25
|
+
"getTransactionInput",
|
|
22
26
|
"getTransactionStatus",
|
|
23
27
|
"getTransactionsByRootAddress",
|
|
24
28
|
"getTransactionsByBlock",
|
|
@@ -49,9 +53,12 @@ var MockTransport = class {
|
|
|
49
53
|
};
|
|
50
54
|
let result;
|
|
51
55
|
switch (method) {
|
|
56
|
+
case "getTransactionInput":
|
|
57
|
+
result = { status: "unavailable" };
|
|
58
|
+
break;
|
|
52
59
|
case "getVersionInfo":
|
|
53
60
|
result = {
|
|
54
|
-
wireFormat: "14.
|
|
61
|
+
wireFormat: "14.4.0",
|
|
55
62
|
implementation: "mock",
|
|
56
63
|
supportedMethods: [...methods]
|
|
57
64
|
};
|
|
@@ -104,6 +111,25 @@ var MockTransport = class {
|
|
|
104
111
|
stateBlockHeight
|
|
105
112
|
};
|
|
106
113
|
break;
|
|
114
|
+
case "getContractDeployment":
|
|
115
|
+
result = {
|
|
116
|
+
address: params.address,
|
|
117
|
+
stateBlockHeight,
|
|
118
|
+
deployment: null
|
|
119
|
+
};
|
|
120
|
+
break;
|
|
121
|
+
case "getEffectiveContract":
|
|
122
|
+
result = {
|
|
123
|
+
address: params.address,
|
|
124
|
+
context: params.context,
|
|
125
|
+
stateBlockHeight,
|
|
126
|
+
selection: null
|
|
127
|
+
};
|
|
128
|
+
break;
|
|
129
|
+
case "getContractArtifact": throw new require_readError.JsonRpcError(-32014, "Contract artifact unavailable", {
|
|
130
|
+
kind: "contractArtifactUnavailable",
|
|
131
|
+
hash: params.hash
|
|
132
|
+
}, method);
|
|
107
133
|
case "dev_getPendingTransactionCount":
|
|
108
134
|
result = { count: "0" };
|
|
109
135
|
break;
|
|
@@ -220,6 +246,7 @@ const NativeRpcErrorCode = {
|
|
|
220
246
|
BackendDataInvalid: -32054,
|
|
221
247
|
BackendTimeout: -32051,
|
|
222
248
|
BackendUnavailable: -32050,
|
|
249
|
+
ContractArtifactUnavailable: -32014,
|
|
223
250
|
FundingAttemptStopped: -32030,
|
|
224
251
|
HistoryUnavailable: -32013,
|
|
225
252
|
InvalidParams: -32602,
|
|
@@ -249,4 +276,4 @@ Object.defineProperty(exports, "txInvalidDetail", {
|
|
|
249
276
|
}
|
|
250
277
|
});
|
|
251
278
|
|
|
252
|
-
//# sourceMappingURL=transport-
|
|
279
|
+
//# sourceMappingURL=transport-tWxKhXUt.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport-tWxKhXUt.cjs","names":["#height","#blockHash","JsonRpcError","hashSignedTransaction","fromHex0x","codec","#transactions","NativeRpcError","UnsupportedRpcValue"],"sources":["../src/transport/mock.ts","../src/transport/txInvalidDetail.ts","../src/rpc/errors.ts"],"sourcesContent":["import type { Transport, RpcParams, TransportRequestOptions } from \"./types.js\";\nimport { codec, deserialize } from \"@thruputchain/protocol\";\nimport { toBase58 } from \"../encoding.js\";\nimport { fromHex0x } from \"../actions/hex.js\";\nimport { hashSignedTransaction } from \"../derivation/transactionHash.js\";\nimport { JsonRpcError } from \"./http.js\";\n\nconst methods = [\n \"getVersionInfo\",\n \"getNetworkInfo\",\n \"getChainTip\",\n \"getChainConfig\",\n \"getServerLimits\",\n \"getBalance\",\n \"getRegisteredAuth\",\n \"getContractDeployment\",\n \"getEffectiveContract\",\n \"getContractArtifact\",\n \"getBlockByHeight\",\n \"dev_getPendingTransactionCount\",\n \"simulateInvocation\",\n \"simulateInvocations\",\n \"sendTransaction\",\n \"getTransactionReceipt\",\n \"getTransactionInput\",\n \"getTransactionStatus\",\n \"getTransactionsByRootAddress\",\n \"getTransactionsByBlock\",\n \"getEvents\",\n \"getStorage\",\n \"faucet_requestAirdrop\",\n];\n/** Deterministic native RPC transport for examples; it does not execute contract code. */\nexport class MockTransport implements Transport {\n #height = 0n;\n #transactions = new Map<string, bigint>();\n async request<T = unknown>(\n method: string,\n params: RpcParams = {},\n options?: TransportRequestOptions,\n ): Promise<T> {\n options?.signal?.throwIfAborted();\n if (Array.isArray(params))\n throw new TypeError(\"Native RPC params must be a named object\");\n const stateBlockHeight = this.#height.toString();\n const bounds = {\n oldestIndexedBlockHeight: \"0\",\n latestIndexedBlockHeight: stateBlockHeight,\n nextCursor: null,\n };\n const simulation = {\n output: { result: \"return\", returnData: \"0x\" },\n events: [],\n gasUsed: \"0\",\n };\n let result: unknown;\n switch (method) {\n case \"getTransactionInput\":\n result = { status: \"unavailable\" };\n break;\n case \"getVersionInfo\":\n result = {\n wireFormat: \"14.4.0\",\n implementation: \"mock\",\n supportedMethods: [...methods],\n };\n break;\n case \"getNetworkInfo\":\n result = { networkHash: \"1\".repeat(32) };\n break;\n case \"getChainTip\":\n result = {\n blockHeight: stateBlockHeight,\n blockHash: this.#blockHash(this.#height),\n };\n break;\n case \"getChainConfig\":\n result = { stated: { maxNewContractsPerTx: 4 } };\n break;\n case \"getServerLimits\":\n result = {\n maxSimulationGas: \"100000000\",\n maxSimulationCalldataBytes: \"65536\",\n maxEventsPerPage: 200,\n maxTransactionsPerPage: 200,\n maxCursorBytes: \"1024\",\n simulationBatch: {\n maxInvocations: 16,\n maxCalldataBytes: 65536,\n maxGas: \"1600000000\",\n maxBackendResponseBytes: 1000000,\n timeoutMs: \"3000\",\n },\n };\n break;\n case \"getBalance\":\n result = { address: params.address, rawBalance: \"0\", stateBlockHeight };\n break;\n case \"getRegisteredAuth\":\n result = {\n address: params.address,\n configuration: null,\n stateBlockHeight,\n };\n break;\n case \"getStorage\":\n result = { item: null, stateBlockHeight };\n break;\n case \"getContractDeployment\":\n result = {\n address: params.address,\n stateBlockHeight,\n deployment: null,\n };\n break;\n case \"getEffectiveContract\":\n result = {\n address: params.address,\n context: params.context,\n stateBlockHeight,\n selection: null,\n };\n break;\n case \"getContractArtifact\":\n throw new JsonRpcError(\n -32014,\n \"Contract artifact unavailable\",\n {\n kind: \"contractArtifactUnavailable\",\n hash: params.hash,\n },\n method,\n );\n case \"dev_getPendingTransactionCount\":\n result = { count: \"0\" };\n break;\n case \"simulateInvocation\":\n result = { ...simulation, stateBlockHeight };\n break;\n case \"simulateInvocations\":\n result = {\n stateBlockHeight,\n results: (params.invocations as unknown[]).map(() =>\n structuredClone(simulation),\n ),\n };\n break;\n case \"faucet_requestAirdrop\":\n result = {\n attemptStatus: \"succeeded\",\n recipient: params.recipient,\n rawAmount: \"100000000\",\n transactionHash: this.#blockHash(this.#height),\n blockHeight: stateBlockHeight,\n execution: { result: \"return\", returnData: \"0x\" },\n };\n break;\n case \"sendTransaction\": {\n const signed = deserialize(\n fromHex0x(String(params.signedTransaction)),\n codec.SignedTransaction,\n );\n const hash = toBase58(hashSignedTransaction(signed));\n if (!this.#transactions.has(hash))\n this.#transactions.set(hash, ++this.#height);\n result = { transactionHash: hash, admission: \"accepted\" };\n break;\n }\n case \"getTransactionReceipt\": {\n const height = this.#transactions.get(String(params.transactionHash));\n result =\n height === undefined\n ? null\n : {\n transactionHash: params.transactionHash,\n blockHeight: height.toString(),\n execution: { result: \"return\", returnData: \"0x\" },\n events: [],\n gasUsed: \"0\",\n };\n break;\n }\n case \"getTransactionStatus\": {\n const height = this.#transactions.get(String(params.transactionHash));\n result =\n height === undefined\n ? { status: \"unknown\" }\n : { status: \"committed\", blockHeight: height.toString() };\n break;\n }\n case \"getEvents\":\n result = { ...bounds, events: [] };\n break;\n case \"getTransactionsByRootAddress\":\n case \"getTransactionsByBlock\":\n result = { ...bounds, transactions: [] };\n break;\n case \"getBlockByHeight\": {\n const height = BigInt(String(params.blockHeight));\n result =\n height <= 0n || height > this.#height\n ? null\n : {\n blockHash: this.#blockHash(height),\n protocol: 0,\n networkHash: \"1\".repeat(32),\n proposer: \"1\".repeat(32),\n blockTimepoint: \"0\",\n blockHeight: height.toString(),\n txsHash: this.#blockHash(height),\n storageHash: this.#blockHash(height),\n eventsHash: this.#blockHash(height),\n configHash: this.#blockHash(height),\n prevBlockHash: this.#blockHash(height - 1n),\n proposalTxsHash: this.#blockHash(height),\n upgrades: [],\n };\n break;\n }\n default:\n throw new Error(`MockTransport: method not implemented: ${method}`);\n }\n return result as T;\n }\n #blockHash(height: bigint): string {\n const bytes = new Uint8Array(32);\n new DataView(bytes.buffer).setBigUint64(24, height);\n return toBase58(bytes);\n }\n}\n","import { NativeRpcError } from \"../rpc/errorReader.js\";\nimport { UnsupportedRpcValue } from \"../rpc/codec.js\";\nimport type { RpcErrorData } from \"../rpc/generated.js\";\n/** A validated native admission bound violation. Unknown details remain on the raw error. */\nexport type TxInvalidDetail = Exclude<\n NonNullable<Extract<RpcErrorData, { kind: \"transactionInvalid\" }>[\"detail\"]>,\n UnsupportedRpcValue\n>;\n/** Read known transaction-bound evidence without inferring retry permission. */\nexport function txInvalidDetail(error: unknown): TxInvalidDetail | null {\n if (\n !(error instanceof NativeRpcError) ||\n error.decoded.classification !== \"known\" ||\n error.decoded.data.kind !== \"transactionInvalid\"\n )\n return null;\n const detail = error.decoded.data.detail;\n return !detail || detail instanceof UnsupportedRpcValue ? null : detail;\n}\n","// Generated from the Rust-owned native OpenRPC fixture. Do not edit.\n/** Native causes. Codes alone never grant write retry permission. */\nexport const NativeRpcErrorCode = {\n BackendDataInvalid: -32054,\n BackendTimeout: -32051,\n BackendUnavailable: -32050,\n ContractArtifactUnavailable: -32014,\n FundingAttemptStopped: -32030,\n HistoryUnavailable: -32013,\n InvalidParams: -32602,\n LocalFundingUnresolved: -32031,\n Overloaded: -32053,\n StateHeightUnavailable: -32012,\n TransactionInvalid: -32000,\n TransactionRejected: -32001,\n} as const;\n"],"mappings":";;;;;;;AAOA,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAEA,IAAa,gBAAb,MAAgD;CAC9C,UAAU;CACV,gCAAgB,IAAI,IAAoB;CACxC,MAAM,QACJ,QACA,SAAoB,CAAC,GACrB,SACY;EACZ,SAAS,QAAQ,eAAe;EAChC,IAAI,MAAM,QAAQ,MAAM,GACtB,MAAM,IAAI,UAAU,0CAA0C;EAChE,MAAM,mBAAmB,KAAKA,QAAQ,SAAS;EAC/C,MAAM,SAAS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
|
|
2
|
-
const require_codec = require("./codec-
|
|
3
|
-
const require_readError = require("./readError-
|
|
4
|
-
const require_transport = require("./transport-
|
|
2
|
+
const require_codec = require("./codec-C3OlYm98.cjs");
|
|
3
|
+
const require_readError = require("./readError-AoNjzW75.cjs");
|
|
4
|
+
const require_transport = require("./transport-tWxKhXUt.cjs");
|
|
5
5
|
exports.HttpRequestError = require_readError.HttpRequestError;
|
|
6
6
|
exports.HttpResponseError = require_readError.HttpResponseError;
|
|
7
7
|
exports.HttpTransport = require_readError.HttpTransport;
|
package/dist/transport.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as TxInvalidDetail, c as classifyReadError, d as HttpRequestError, f as HttpResponseError, h as JsonRpcError, i as NativeRpcErrorCode, l as MockTransport, m as HttpTransportOptions, n as DecodedRpcError, o as txInvalidDetail, p as HttpTransport, r as NativeRpcError, s as ReadErrorKind, t as RpcResponseError, u as HttpBatchOptions } from "./index-
|
|
3
|
-
export { type DecodedRpcError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, type ReadErrorKind, type RpcAdmission, type RpcAirdropAttempt, type RpcAirdropExecution, type RpcAscendingAnchor, type RpcAssumedAuth, type RpcAuthConfiguration, type RpcAuthSigner, type RpcBalanceResult, type RpcBase58_ContractAddress, type RpcBase58_Ed25519PublicKey, type RpcBase58_PublicKeyHash, type RpcBase58_SHA256Hash, type RpcBase58_ValidatorID, type RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, type RpcPublicKey, type RpcReceiptExecution, type RpcRecentAttemptFailure, type RpcRegisteredAuthResult, RpcRequestValidationError, type RpcRequests, RpcResponseError, type RpcResults, type RpcSchedulerError, type RpcSchedulerErrorSource, type RpcSendTransactionResult, type RpcServerLimits, type RpcSimulationBatchLimits, type RpcSimulationResult, type RpcSimulationResults, type RpcStorageCosts, type RpcStorageItem, type RpcStorageResult, type RpcTopicFilter, type RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type Transport, type TransportRequestOptions, type TxInvalidDetail, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
|
|
1
|
+
import { $ as RpcPublicKey, A as RpcContractDeploymentResult, B as RpcEventPage, C as RpcChainConfig, Ct as RpcDecodingError, D as RpcConflictDiagnostic, Dt as Transport, E as RpcConflictCode, Et as RpcParams, F as RpcEffectiveContract, G as RpcIdentifiedEvent, H as RpcFailureCause, I as RpcEffectiveContractResult, J as RpcInvocationOutput, K as RpcInvocation, L as RpcEmittedEvent, M as RpcDecimalTimePoint, N as RpcDecimalU64, O as RpcContractArtifactResult, Ot as TransportRequestOptions, P as RpcDescendingAnchor, Q as RpcPendingTransactionCount, R as RpcErrorData, S as RpcBlockStart, St as RpcVersionInfo, T as RpcConfigLimits, Tt as UnsupportedRpcValue, U as RpcFundingSubmission, V as RpcExecutionConfig, W as RpcHistoryStart, X as RpcIterationOrder, Y as RpcInvocationResult, Z as RpcNetworkInfo, _ as RpcBase58_Ed25519PublicKey, _t as RpcTransactionReceipt, a as RpcMethod, at as RpcSchedulerError, b as RpcBase58_ValidatorID, bt as RpcTransactionStatus, c as RpcAdmission, ct as RpcServerLimits, d as RpcAscendingAnchor, dt as RpcSimulationResults, et as RpcReceiptExecution, f as RpcAssumedAuth, ft as RpcStorageCosts, g as RpcBase58_ContractAddress, gt as RpcTransactionInputResult, h as RpcBalanceResult, ht as RpcTopicFilter, i as RpcDiscovery, it as RpcResults, j as RpcContractRejectCode, k as RpcContractDeployment, l as RpcAirdropAttempt, lt as RpcSimulationBatchLimits, m as RpcAuthSigner, mt as RpcStorageResult, n as RpcClientOptions, nt as RpcRegisteredAuthResult, o as RpcMethods, ot as RpcSchedulerErrorSource, p as RpcAuthConfiguration, pt as RpcStorageItem, q as RpcInvocationContext, r as RpcCompatibilityError, rt as RpcRequests, s as createRpcClient, st as RpcSendTransactionResult, t as RpcClient, tt as RpcRecentAttemptFailure, u as RpcAirdropExecution, ut as RpcSimulationResult, v as RpcBase58_PublicKeyHash, vt as RpcTransactionRef, w as RpcChainTip, wt as RpcRequestValidationError, x as RpcBlockInfo, xt as RpcTxHash, y as RpcBase58_SHA256Hash, yt as RpcTransactionRefPage, z as RpcEventFilter } from "./client-JixxskeH.cjs";
|
|
2
|
+
import { a as TxInvalidDetail, c as classifyReadError, d as HttpRequestError, f as HttpResponseError, h as JsonRpcError, i as NativeRpcErrorCode, l as MockTransport, m as HttpTransportOptions, n as DecodedRpcError, o as txInvalidDetail, p as HttpTransport, r as NativeRpcError, s as ReadErrorKind, t as RpcResponseError, u as HttpBatchOptions } from "./index-BraLWObY.cjs";
|
|
3
|
+
export { type DecodedRpcError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, type ReadErrorKind, type RpcAdmission, type RpcAirdropAttempt, type RpcAirdropExecution, type RpcAscendingAnchor, type RpcAssumedAuth, type RpcAuthConfiguration, type RpcAuthSigner, type RpcBalanceResult, type RpcBase58_ContractAddress, type RpcBase58_Ed25519PublicKey, type RpcBase58_PublicKeyHash, type RpcBase58_SHA256Hash, type RpcBase58_ValidatorID, type RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractArtifactResult, type RpcContractDeployment, type RpcContractDeploymentResult, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEffectiveContract, type RpcEffectiveContractResult, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationContext, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, type RpcPublicKey, type RpcReceiptExecution, type RpcRecentAttemptFailure, type RpcRegisteredAuthResult, RpcRequestValidationError, type RpcRequests, RpcResponseError, type RpcResults, type RpcSchedulerError, type RpcSchedulerErrorSource, type RpcSendTransactionResult, type RpcServerLimits, type RpcSimulationBatchLimits, type RpcSimulationResult, type RpcSimulationResults, type RpcStorageCosts, type RpcStorageItem, type RpcStorageResult, type RpcTopicFilter, type RpcTransactionInputResult, type RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type Transport, type TransportRequestOptions, type TxInvalidDetail, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
|
package/dist/transport.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as TxInvalidDetail, c as classifyReadError, d as HttpRequestError, f as HttpResponseError, h as JsonRpcError, i as NativeRpcErrorCode, l as MockTransport, m as HttpTransportOptions, n as DecodedRpcError, o as txInvalidDetail, p as HttpTransport, r as NativeRpcError, s as ReadErrorKind, t as RpcResponseError, u as HttpBatchOptions } from "./index-
|
|
3
|
-
export { type DecodedRpcError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, type ReadErrorKind, type RpcAdmission, type RpcAirdropAttempt, type RpcAirdropExecution, type RpcAscendingAnchor, type RpcAssumedAuth, type RpcAuthConfiguration, type RpcAuthSigner, type RpcBalanceResult, type RpcBase58_ContractAddress, type RpcBase58_Ed25519PublicKey, type RpcBase58_PublicKeyHash, type RpcBase58_SHA256Hash, type RpcBase58_ValidatorID, type RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, type RpcPublicKey, type RpcReceiptExecution, type RpcRecentAttemptFailure, type RpcRegisteredAuthResult, RpcRequestValidationError, type RpcRequests, RpcResponseError, type RpcResults, type RpcSchedulerError, type RpcSchedulerErrorSource, type RpcSendTransactionResult, type RpcServerLimits, type RpcSimulationBatchLimits, type RpcSimulationResult, type RpcSimulationResults, type RpcStorageCosts, type RpcStorageItem, type RpcStorageResult, type RpcTopicFilter, type RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type Transport, type TransportRequestOptions, type TxInvalidDetail, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
|
|
1
|
+
import { $ as RpcPublicKey, A as RpcContractDeploymentResult, B as RpcEventPage, C as RpcChainConfig, Ct as RpcDecodingError, D as RpcConflictDiagnostic, Dt as Transport, E as RpcConflictCode, Et as RpcParams, F as RpcEffectiveContract, G as RpcIdentifiedEvent, H as RpcFailureCause, I as RpcEffectiveContractResult, J as RpcInvocationOutput, K as RpcInvocation, L as RpcEmittedEvent, M as RpcDecimalTimePoint, N as RpcDecimalU64, O as RpcContractArtifactResult, Ot as TransportRequestOptions, P as RpcDescendingAnchor, Q as RpcPendingTransactionCount, R as RpcErrorData, S as RpcBlockStart, St as RpcVersionInfo, T as RpcConfigLimits, Tt as UnsupportedRpcValue, U as RpcFundingSubmission, V as RpcExecutionConfig, W as RpcHistoryStart, X as RpcIterationOrder, Y as RpcInvocationResult, Z as RpcNetworkInfo, _ as RpcBase58_Ed25519PublicKey, _t as RpcTransactionReceipt, a as RpcMethod, at as RpcSchedulerError, b as RpcBase58_ValidatorID, bt as RpcTransactionStatus, c as RpcAdmission, ct as RpcServerLimits, d as RpcAscendingAnchor, dt as RpcSimulationResults, et as RpcReceiptExecution, f as RpcAssumedAuth, ft as RpcStorageCosts, g as RpcBase58_ContractAddress, gt as RpcTransactionInputResult, h as RpcBalanceResult, ht as RpcTopicFilter, i as RpcDiscovery, it as RpcResults, j as RpcContractRejectCode, k as RpcContractDeployment, l as RpcAirdropAttempt, lt as RpcSimulationBatchLimits, m as RpcAuthSigner, mt as RpcStorageResult, n as RpcClientOptions, nt as RpcRegisteredAuthResult, o as RpcMethods, ot as RpcSchedulerErrorSource, p as RpcAuthConfiguration, pt as RpcStorageItem, q as RpcInvocationContext, r as RpcCompatibilityError, rt as RpcRequests, s as createRpcClient, st as RpcSendTransactionResult, t as RpcClient, tt as RpcRecentAttemptFailure, u as RpcAirdropExecution, ut as RpcSimulationResult, v as RpcBase58_PublicKeyHash, vt as RpcTransactionRef, w as RpcChainTip, wt as RpcRequestValidationError, x as RpcBlockInfo, xt as RpcTxHash, y as RpcBase58_SHA256Hash, yt as RpcTransactionRefPage, z as RpcEventFilter } from "./client-JixxskeH.js";
|
|
2
|
+
import { a as TxInvalidDetail, c as classifyReadError, d as HttpRequestError, f as HttpResponseError, h as JsonRpcError, i as NativeRpcErrorCode, l as MockTransport, m as HttpTransportOptions, n as DecodedRpcError, o as txInvalidDetail, p as HttpTransport, r as NativeRpcError, s as ReadErrorKind, t as RpcResponseError, u as HttpBatchOptions } from "./index-ByvV2UF6.js";
|
|
3
|
+
export { type DecodedRpcError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, type ReadErrorKind, type RpcAdmission, type RpcAirdropAttempt, type RpcAirdropExecution, type RpcAscendingAnchor, type RpcAssumedAuth, type RpcAuthConfiguration, type RpcAuthSigner, type RpcBalanceResult, type RpcBase58_ContractAddress, type RpcBase58_Ed25519PublicKey, type RpcBase58_PublicKeyHash, type RpcBase58_SHA256Hash, type RpcBase58_ValidatorID, type RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractArtifactResult, type RpcContractDeployment, type RpcContractDeploymentResult, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEffectiveContract, type RpcEffectiveContractResult, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationContext, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, type RpcPublicKey, type RpcReceiptExecution, type RpcRecentAttemptFailure, type RpcRegisteredAuthResult, RpcRequestValidationError, type RpcRequests, RpcResponseError, type RpcResults, type RpcSchedulerError, type RpcSchedulerErrorSource, type RpcSendTransactionResult, type RpcServerLimits, type RpcSimulationBatchLimits, type RpcSimulationResult, type RpcSimulationResults, type RpcStorageCosts, type RpcStorageItem, type RpcStorageResult, type RpcTopicFilter, type RpcTransactionInputResult, type RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type Transport, type TransportRequestOptions, type TxInvalidDetail, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
|
package/dist/transport.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RpcRequestValidationError, r as UnsupportedRpcValue, t as RpcDecodingError } from "./codec-
|
|
2
|
-
import { a as HttpRequestError, c as JsonRpcError, i as NativeRpcError, l as RpcResponseError, n as RpcCompatibilityError, o as HttpResponseError, r as createRpcClient, s as HttpTransport, t as classifyReadError } from "./readError-
|
|
3
|
-
import { n as txInvalidDetail, r as MockTransport, t as NativeRpcErrorCode } from "./transport-
|
|
1
|
+
import { n as RpcRequestValidationError, r as UnsupportedRpcValue, t as RpcDecodingError } from "./codec-BHKoSaOP.js";
|
|
2
|
+
import { a as HttpRequestError, c as JsonRpcError, i as NativeRpcError, l as RpcResponseError, n as RpcCompatibilityError, o as HttpResponseError, r as createRpcClient, s as HttpTransport, t as classifyReadError } from "./readError-CZPYcW__.js";
|
|
3
|
+
import { n as txInvalidDetail, r as MockTransport, t as NativeRpcErrorCode } from "./transport-CBFwAIIv.js";
|
|
4
4
|
export { HttpRequestError, HttpResponseError, HttpTransport, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, RpcCompatibilityError, RpcDecodingError, RpcRequestValidationError, RpcResponseError, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as deriveContractAddress, o as bytesEqual, u as hashContract } from "./contract-DzvyyFCI.js";
|
|
2
2
|
import { g as toBase58, i as toHex0x, l as hashFromBase58, s as fixedFromBase58 } from "./hex-DIcaALXL.js";
|
|
3
|
-
import { _ as createDefaultWalletBatchInvocation, d as assertTransactionSuccess, f as createSubmissionEvidence, i as ExecutionDecodeError, m as submitAndObserve, n as signWalletTransaction, p as decodeExecution, r as prepareTransaction, s as TransactionObservationError, t as sendInvocation, u as assertTransactionAdmission, v as defaultWalletAdapter } from "./sendInvocation-
|
|
3
|
+
import { _ as createDefaultWalletBatchInvocation, d as assertTransactionSuccess, f as createSubmissionEvidence, i as ExecutionDecodeError, m as submitAndObserve, n as signWalletTransaction, p as decodeExecution, r as prepareTransaction, s as TransactionObservationError, t as sendInvocation, u as assertTransactionAdmission, v as defaultWalletAdapter } from "./sendInvocation-BwabRa2N.js";
|
|
4
4
|
import { S as pubkeyAccountPreimage, a as assertWalletTransaction, b as WalletProviderError, c as parseSignedTransactionHex, d as parseWalletAccount, f as parseWalletCapabilities, g as parseWalletProviderError, h as parseWalletProvider, l as parseSubmitTransactionResult, m as parseWalletNetworkHash, s as parseSignTransactionResult, u as parseTransactionHex, v as parseWalletSession, x as derivePubkeyAccountAddress, y as verifySignTransactionResult } from "./validation-eXATmgO0.js";
|
|
5
5
|
import "./provider.js";
|
|
6
6
|
import { AuthClaimType, ContractType, CryptographicScheme, bitMap, codec, contractAddress, deserialize, ed25519PublicKey, kMaxSigners, networkHash, serialize, sha256Hash, weight } from "@thruputchain/protocol";
|
|
@@ -664,4 +664,4 @@ function createProviderWalletClient(options) {
|
|
|
664
664
|
//#endregion
|
|
665
665
|
export { rv32Contract as a, prepareContractDeployment as i, createWalletClient as n, createPubkeyAccount as o, decodeDeployment as r, createSourceAddressAccount as s, createProviderWalletClient as t };
|
|
666
666
|
|
|
667
|
-
//# sourceMappingURL=wallet-
|
|
667
|
+
//# sourceMappingURL=wallet-7RELuTkf.js.map
|