@thruputchain/client 0.0.0-stage → 0.25.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 +201 -0
- package/README.md +935 -2
- package/dist/actions-CdFSUTO2.js +298 -0
- package/dist/actions-CdFSUTO2.js.map +1 -0
- package/dist/actions-DxJZ3yIv.cjs +357 -0
- package/dist/actions-DxJZ3yIv.cjs.map +1 -0
- package/dist/actions.cjs +19 -0
- package/dist/actions.d.cts +4 -0
- package/dist/actions.d.ts +4 -0
- package/dist/actions.js +3 -0
- package/dist/client-BxB6ktQd.d.cts +690 -0
- package/dist/client-BxB6ktQd.d.cts.map +1 -0
- package/dist/client-BxB6ktQd.d.ts +690 -0
- package/dist/client-BxB6ktQd.d.ts.map +1 -0
- package/dist/codec-B7HJjMzI.cjs +8190 -0
- package/dist/codec-B7HJjMzI.cjs.map +1 -0
- package/dist/codec-CX-19jac.js +8130 -0
- package/dist/codec-CX-19jac.js.map +1 -0
- package/dist/contract-BpxjDMHw.js +1105 -0
- package/dist/contract-BpxjDMHw.js.map +1 -0
- package/dist/contract-D0wCFcAN.cjs +1219 -0
- package/dist/contract-D0wCFcAN.cjs.map +1 -0
- package/dist/contract.cjs +58 -0
- package/dist/contract.d.cts +3 -0
- package/dist/contract.d.ts +3 -0
- package/dist/contract.js +2 -0
- package/dist/contracts.cjs +1050 -0
- package/dist/contracts.cjs.map +1 -0
- package/dist/contracts.d.cts +397 -0
- package/dist/contracts.d.cts.map +1 -0
- package/dist/contracts.d.ts +397 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +1030 -0
- package/dist/contracts.js.map +1 -0
- package/dist/dev_wallet-BXWK5KR6.cjs +530 -0
- package/dist/dev_wallet-BXWK5KR6.cjs.map +1 -0
- package/dist/dev_wallet-C9eMQROk.js +497 -0
- package/dist/dev_wallet-C9eMQROk.js.map +1 -0
- package/dist/domainSeparator-B_vU_zUD.cjs +102 -0
- package/dist/domainSeparator-B_vU_zUD.cjs.map +1 -0
- package/dist/domainSeparator-CBCvxIj-.js +79 -0
- package/dist/domainSeparator-CBCvxIj-.js.map +1 -0
- package/dist/execution-CRDyKu45.d.ts +227 -0
- package/dist/execution-CRDyKu45.d.ts.map +1 -0
- package/dist/execution-DyxaIG4v.d.cts +227 -0
- package/dist/execution-DyxaIG4v.d.cts.map +1 -0
- package/dist/hex-DIcaALXL.js +112 -0
- package/dist/hex-DIcaALXL.js.map +1 -0
- package/dist/hex-DkGpiZ5e.cjs +189 -0
- package/dist/hex-DkGpiZ5e.cjs.map +1 -0
- package/dist/index--5LsCotr.d.ts +192 -0
- package/dist/index--5LsCotr.d.ts.map +1 -0
- package/dist/index-B5KqSHeL.d.cts +192 -0
- package/dist/index-B5KqSHeL.d.cts.map +1 -0
- package/dist/index-BZ0O5jZG.d.cts +163 -0
- package/dist/index-BZ0O5jZG.d.cts.map +1 -0
- package/dist/index-BuPQcAK2.d.ts +23 -0
- package/dist/index-BuPQcAK2.d.ts.map +1 -0
- package/dist/index-ByNNqY7S.d.cts +83 -0
- package/dist/index-ByNNqY7S.d.cts.map +1 -0
- package/dist/index-C-M-4jMR.d.cts +263 -0
- package/dist/index-C-M-4jMR.d.cts.map +1 -0
- package/dist/index-C97zw2rk.d.ts +137 -0
- package/dist/index-C97zw2rk.d.ts.map +1 -0
- package/dist/index-CIHK7Ew9.d.cts +303 -0
- package/dist/index-CIHK7Ew9.d.cts.map +1 -0
- package/dist/index-CIHK7Ew9.d.ts +303 -0
- package/dist/index-CIHK7Ew9.d.ts.map +1 -0
- package/dist/index-CXuO2Zjx.d.ts +263 -0
- package/dist/index-CXuO2Zjx.d.ts.map +1 -0
- package/dist/index-DOEBWXY2.d.cts +137 -0
- package/dist/index-DOEBWXY2.d.cts.map +1 -0
- package/dist/index-DzrLv3EA.d.cts +82 -0
- package/dist/index-DzrLv3EA.d.cts.map +1 -0
- package/dist/index-DzrLv3EA.d.ts +82 -0
- package/dist/index-DzrLv3EA.d.ts.map +1 -0
- package/dist/index-fdTURpBk.d.ts +83 -0
- package/dist/index-fdTURpBk.d.ts.map +1 -0
- package/dist/index-sAzHHayu.d.ts +163 -0
- package/dist/index-sAzHHayu.d.ts.map +1 -0
- package/dist/index-uQqRk9Ww.d.cts +23 -0
- package/dist/index-uQqRk9Ww.d.cts.map +1 -0
- package/dist/index.cjs +478 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +173 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +173 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +231 -0
- package/dist/index.js.map +1 -0
- package/dist/provider.cjs +101 -0
- package/dist/provider.cjs.map +1 -0
- package/dist/provider.d.cts +2 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.js +76 -0
- package/dist/provider.js.map +1 -0
- package/dist/readError-BVbfTMLv.cjs +604 -0
- package/dist/readError-BVbfTMLv.cjs.map +1 -0
- package/dist/readError-Dn_XN98x.js +551 -0
- package/dist/readError-Dn_XN98x.js.map +1 -0
- package/dist/readViews-BKJtE5J3.d.cts +594 -0
- package/dist/readViews-BKJtE5J3.d.cts.map +1 -0
- package/dist/readViews-C_FX8wby.d.ts +594 -0
- package/dist/readViews-C_FX8wby.d.ts.map +1 -0
- package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
- package/dist/sendInvocation-2EZanZZr.cjs +661 -0
- package/dist/sendInvocation-2EZanZZr.cjs.map +1 -0
- package/dist/sendInvocation-C4ruTC-9.js +505 -0
- package/dist/sendInvocation-C4ruTC-9.js.map +1 -0
- package/dist/sign-BewmV_EL.cjs +139 -0
- package/dist/sign-BewmV_EL.cjs.map +1 -0
- package/dist/sign-DVIRyW8Y.js +122 -0
- package/dist/sign-DVIRyW8Y.js.map +1 -0
- package/dist/sign-Ve0eetRO.d.ts +48 -0
- package/dist/sign-Ve0eetRO.d.ts.map +1 -0
- package/dist/sign-eUT0iGQG.d.cts +48 -0
- package/dist/sign-eUT0iGQG.d.cts.map +1 -0
- package/dist/signed-op.cjs +9 -0
- package/dist/signed-op.d.cts +3 -0
- package/dist/signed-op.d.ts +3 -0
- package/dist/signed-op.js +3 -0
- package/dist/signedOp-Bluo0OAd.cjs +183 -0
- package/dist/signedOp-Bluo0OAd.cjs.map +1 -0
- package/dist/signedOp-x4fakrr4.js +166 -0
- package/dist/signedOp-x4fakrr4.js.map +1 -0
- package/dist/signed_op-BzVbBgv4.js +154 -0
- package/dist/signed_op-BzVbBgv4.js.map +1 -0
- package/dist/signed_op-DFgQ2yFj.d.ts +58 -0
- package/dist/signed_op-DFgQ2yFj.d.ts.map +1 -0
- package/dist/signed_op-LwxrDud8.d.cts +58 -0
- package/dist/signed_op-LwxrDud8.d.cts.map +1 -0
- package/dist/signed_op-z_8fqAi1.cjs +175 -0
- package/dist/signed_op-z_8fqAi1.cjs.map +1 -0
- package/dist/signers-BFP84wJP.cjs +137 -0
- package/dist/signers-BFP84wJP.cjs.map +1 -0
- package/dist/signers-CzOSedwJ.js +120 -0
- package/dist/signers-CzOSedwJ.js.map +1 -0
- package/dist/signers.cjs +5 -0
- package/dist/signers.d.cts +3 -0
- package/dist/signers.d.ts +3 -0
- package/dist/signers.js +2 -0
- package/dist/size-506oTE28.js +91 -0
- package/dist/size-506oTE28.js.map +1 -0
- package/dist/size-OAFfOthl.cjs +108 -0
- package/dist/size-OAFfOthl.cjs.map +1 -0
- package/dist/transaction-CwkQxQOx.js +24 -0
- package/dist/transaction-CwkQxQOx.js.map +1 -0
- package/dist/transaction-DrSrCJ5y.cjs +47 -0
- package/dist/transaction-DrSrCJ5y.cjs.map +1 -0
- package/dist/transaction.cjs +13 -0
- package/dist/transaction.d.cts +3 -0
- package/dist/transaction.d.ts +3 -0
- package/dist/transaction.js +4 -0
- package/dist/transactionHash-CO9ajbvU.js +24 -0
- package/dist/transactionHash-CO9ajbvU.js.map +1 -0
- package/dist/transactionHash-D5yf4KoL.cjs +29 -0
- package/dist/transactionHash-D5yf4KoL.cjs.map +1 -0
- package/dist/transport-B-P16rs6.cjs +252 -0
- package/dist/transport-B-P16rs6.cjs.map +1 -0
- package/dist/transport-DqyoNtUy.js +234 -0
- package/dist/transport-DqyoNtUy.js.map +1 -0
- package/dist/transport.cjs +19 -0
- package/dist/transport.d.cts +3 -0
- package/dist/transport.d.ts +3 -0
- package/dist/transport.js +4 -0
- package/dist/types-BE40oD_Q.d.cts +18 -0
- package/dist/types-BE40oD_Q.d.cts.map +1 -0
- package/dist/types-BE40oD_Q.d.ts +18 -0
- package/dist/types-BE40oD_Q.d.ts.map +1 -0
- package/dist/validation-4w-vDGAi.cjs +543 -0
- package/dist/validation-4w-vDGAi.cjs.map +1 -0
- package/dist/validation-eXATmgO0.js +411 -0
- package/dist/validation-eXATmgO0.js.map +1 -0
- package/dist/wallet-Bthapk8i.cjs +709 -0
- package/dist/wallet-Bthapk8i.cjs.map +1 -0
- package/dist/wallet-CwWPYoHF.js +667 -0
- package/dist/wallet-CwWPYoHF.js.map +1 -0
- package/dist/wallet.cjs +27 -0
- package/dist/wallet.d.cts +3 -0
- package/dist/wallet.d.ts +3 -0
- package/dist/wallet.js +3 -0
- package/package.json +122 -4
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CxsWriter, codec, serializeCxs, sha256Hash } from "@thruputchain/protocol";
|
|
2
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
3
|
+
//#region src/derivation/domainSeparator.ts
|
|
4
|
+
/**
|
|
5
|
+
* Maximum UTF-8 length of a domain-separator name, from the protocol's
|
|
6
|
+
* `DomainSeparator.domain_separator: opaque<256>` bound.
|
|
7
|
+
*/
|
|
8
|
+
const kMaxNameLen = 256;
|
|
9
|
+
/**
|
|
10
|
+
* A domain separator: the precomputed CXS bytes of the protocol
|
|
11
|
+
* `DomainSeparator { ext: 0, domain_separator: <name> }`, used to prefix hash
|
|
12
|
+
* preimages so hashes from different domains can never collide.
|
|
13
|
+
*
|
|
14
|
+
* Mirrors the Rust `thruput-domain-separator` crate. Module-internal: the
|
|
15
|
+
* public API exposes only the derived-address helpers built on top of it.
|
|
16
|
+
*/
|
|
17
|
+
var DomainSeparator = class DomainSeparator {
|
|
18
|
+
bytes;
|
|
19
|
+
constructor(bytes) {
|
|
20
|
+
this.bytes = bytes;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Builds the separator for `name`, CXS-encoding it through the same
|
|
24
|
+
* `ExtensionPoint` codec the protocol uses.
|
|
25
|
+
*
|
|
26
|
+
* @throws If the UTF-8 encoding of `name` exceeds 256 bytes (the protocol's
|
|
27
|
+
* `opaque<256>` bound).
|
|
28
|
+
*/
|
|
29
|
+
static make(name) {
|
|
30
|
+
const nameBytes = new TextEncoder().encode(name);
|
|
31
|
+
if (nameBytes.length > kMaxNameLen) throw new Error(`Domain separator name is ${nameBytes.length} UTF-8 bytes; the protocol bound is ${kMaxNameLen}`);
|
|
32
|
+
const ext = serializeCxs({ v: 0 }, codec.ExtensionPoint);
|
|
33
|
+
const writer = new CxsWriter();
|
|
34
|
+
writer.writeVarOpaque(nameBytes, kMaxNameLen);
|
|
35
|
+
const opaque = writer.finish();
|
|
36
|
+
const bytes = new Uint8Array(ext.length + opaque.length);
|
|
37
|
+
bytes.set(ext, 0);
|
|
38
|
+
bytes.set(opaque, ext.length);
|
|
39
|
+
return new DomainSeparator(bytes);
|
|
40
|
+
}
|
|
41
|
+
/** `sha256(prefix || objectCxs)` over already-CXS-encoded object bytes. */
|
|
42
|
+
hash(objectCxs) {
|
|
43
|
+
const preimage = new Uint8Array(this.bytes.length + objectCxs.length);
|
|
44
|
+
preimage.set(this.bytes, 0);
|
|
45
|
+
preimage.set(objectCxs, this.bytes.length);
|
|
46
|
+
return sha256Hash(sha256(preimage));
|
|
47
|
+
}
|
|
48
|
+
/** `sha256(prefix || cxs(value))`, serializing `value` with `objectCodec`. */
|
|
49
|
+
hashObject(value, objectCodec) {
|
|
50
|
+
return this.hash(serializeCxs(value, objectCodec));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Domain separator for public-key hashes (`"PublicKey"`): a `PublicKeyHash` is
|
|
55
|
+
* `sha256(cxs(DomainSeparator("PublicKey")) || cxs(PublicKey))`.
|
|
56
|
+
*/
|
|
57
|
+
const PUBLIC_KEY = DomainSeparator.make("PublicKey");
|
|
58
|
+
/** Domain separator for pubkey account address derivation. */
|
|
59
|
+
const PUBKEY_ACCOUNT = DomainSeparator.make("PubkeyAccount");
|
|
60
|
+
/**
|
|
61
|
+
* Domain separator for transaction signature preimages.
|
|
62
|
+
*
|
|
63
|
+
* Unlike {@link PUBKEY_ACCOUNT} this one prefixes a message that is signed
|
|
64
|
+
* directly rather than hashed, so it is used through its {@link
|
|
65
|
+
* DomainSeparator.bytes} rather than `hash` / `hashObject`. See
|
|
66
|
+
* `transactionSignaturePreimage`.
|
|
67
|
+
*/
|
|
68
|
+
const TRANSACTION = DomainSeparator.make("Transaction");
|
|
69
|
+
/**
|
|
70
|
+
* Domain separator for signed operations (`"SignedOp"`).
|
|
71
|
+
*
|
|
72
|
+
* Like {@link TRANSACTION} it prefixes a message that is signed directly; see
|
|
73
|
+
* `signedOperationPreimage`.
|
|
74
|
+
*/
|
|
75
|
+
const SIGNED_OP = DomainSeparator.make("SignedOp");
|
|
76
|
+
//#endregion
|
|
77
|
+
export { TRANSACTION as i, PUBLIC_KEY as n, SIGNED_OP as r, PUBKEY_ACCOUNT as t };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=domainSeparator-CBCvxIj-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domainSeparator-CBCvxIj-.js","names":[],"sources":["../src/derivation/domainSeparator.ts"],"sourcesContent":["import { sha256 } from \"@noble/hashes/sha2.js\";\nimport {\n CxsWriter,\n codec,\n serializeCxs,\n sha256Hash,\n} from \"@thruputchain/protocol\";\nimport type { SHA256Hash } from \"@thruputchain/protocol\";\nimport type { XdrCodec } from \"@thruputchain/xdr\";\n\n/**\n * Maximum UTF-8 length of a domain-separator name, from the protocol's\n * `DomainSeparator.domain_separator: opaque<256>` bound.\n */\nconst kMaxNameLen = 256;\n\n/**\n * A domain separator: the precomputed CXS bytes of the protocol\n * `DomainSeparator { ext: 0, domain_separator: <name> }`, used to prefix hash\n * preimages so hashes from different domains can never collide.\n *\n * Mirrors the Rust `thruput-domain-separator` crate. Module-internal: the\n * public API exposes only the derived-address helpers built on top of it.\n */\nexport class DomainSeparator {\n private constructor(readonly bytes: Uint8Array) {}\n\n /**\n * Builds the separator for `name`, CXS-encoding it through the same\n * `ExtensionPoint` codec the protocol uses.\n *\n * @throws If the UTF-8 encoding of `name` exceeds 256 bytes (the protocol's\n * `opaque<256>` bound).\n */\n static make(name: string): DomainSeparator {\n const nameBytes = new TextEncoder().encode(name);\n if (nameBytes.length > kMaxNameLen) {\n throw new Error(\n `Domain separator name is ${nameBytes.length} UTF-8 bytes; the protocol bound is ${kMaxNameLen}`,\n );\n }\n const ext = serializeCxs({ v: 0 }, codec.ExtensionPoint);\n const writer = new CxsWriter();\n writer.writeVarOpaque(nameBytes, kMaxNameLen);\n const opaque = writer.finish();\n const bytes = new Uint8Array(ext.length + opaque.length);\n bytes.set(ext, 0);\n bytes.set(opaque, ext.length);\n return new DomainSeparator(bytes);\n }\n\n /** `sha256(prefix || objectCxs)` over already-CXS-encoded object bytes. */\n hash(objectCxs: Uint8Array): SHA256Hash {\n const preimage = new Uint8Array(this.bytes.length + objectCxs.length);\n preimage.set(this.bytes, 0);\n preimage.set(objectCxs, this.bytes.length);\n return sha256Hash(sha256(preimage));\n }\n\n /** `sha256(prefix || cxs(value))`, serializing `value` with `objectCodec`. */\n hashObject<T>(value: T, objectCodec: XdrCodec<T>): SHA256Hash {\n return this.hash(serializeCxs(value, objectCodec));\n }\n}\n\n/**\n * Domain separator for public-key hashes (`\"PublicKey\"`): a `PublicKeyHash` is\n * `sha256(cxs(DomainSeparator(\"PublicKey\")) || cxs(PublicKey))`.\n */\nexport const PUBLIC_KEY: DomainSeparator = DomainSeparator.make(\"PublicKey\");\n\n/** Domain separator for pubkey account address derivation. */\nexport const PUBKEY_ACCOUNT: DomainSeparator =\n DomainSeparator.make(\"PubkeyAccount\");\n\n/**\n * Domain separator for transaction signature preimages.\n *\n * Unlike {@link PUBKEY_ACCOUNT} this one prefixes a message that is signed\n * directly rather than hashed, so it is used through its {@link\n * DomainSeparator.bytes} rather than `hash` / `hashObject`. See\n * `transactionSignaturePreimage`.\n */\nexport const TRANSACTION: DomainSeparator = DomainSeparator.make(\"Transaction\");\n\n/**\n * Domain separator for signed operations (`\"SignedOp\"`).\n *\n * Like {@link TRANSACTION} it prefixes a message that is signed directly; see\n * `signedOperationPreimage`.\n */\nexport const SIGNED_OP: DomainSeparator = DomainSeparator.make(\"SignedOp\");\n"],"mappings":";;;;;;;AAcA,MAAM,cAAc;;;;;;;;;AAUpB,IAAa,kBAAb,MAAa,gBAAgB;CACE;CAA7B,YAAoB,OAA4B;EAAnB,KAAA,QAAA;CAAoB;;;;;;;;CASjD,OAAO,KAAK,MAA+B;EACzC,MAAM,YAAY,IAAI,YAAY,CAAC,CAAC,OAAO,IAAI;EAC/C,IAAI,UAAU,SAAS,aACrB,MAAM,IAAI,MACR,4BAA4B,UAAU,OAAO,sCAAsC,aACrF;EAEF,MAAM,MAAM,aAAa,EAAE,GAAG,EAAE,GAAG,MAAM,cAAc;EACvD,MAAM,SAAS,IAAI,UAAU;EAC7B,OAAO,eAAe,WAAW,WAAW;EAC5C,MAAM,SAAS,OAAO,OAAO;EAC7B,MAAM,QAAQ,IAAI,WAAW,IAAI,SAAS,OAAO,MAAM;EACvD,MAAM,IAAI,KAAK,CAAC;EAChB,MAAM,IAAI,QAAQ,IAAI,MAAM;EAC5B,OAAO,IAAI,gBAAgB,KAAK;CAClC;;CAGA,KAAK,WAAmC;EACtC,MAAM,WAAW,IAAI,WAAW,KAAK,MAAM,SAAS,UAAU,MAAM;EACpE,SAAS,IAAI,KAAK,OAAO,CAAC;EAC1B,SAAS,IAAI,WAAW,KAAK,MAAM,MAAM;EACzC,OAAO,WAAW,OAAO,QAAQ,CAAC;CACpC;;CAGA,WAAc,OAAU,aAAsC;EAC5D,OAAO,KAAK,KAAK,aAAa,OAAO,WAAW,CAAC;CACnD;AACF;;;;;AAMA,MAAa,aAA8B,gBAAgB,KAAK,WAAW;;AAG3E,MAAa,iBACX,gBAAgB,KAAK,eAAe;;;;;;;;;AAUtC,MAAa,cAA+B,gBAAgB,KAAK,aAAa;;;;;;;AAQ9E,MAAa,YAA6B,gBAAgB,KAAK,UAAU"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { tt as RpcSendTransactionResult } from "./client-BxB6ktQd.js";
|
|
2
|
+
import { Kt as KnownCommitment, Ln as TransactionReceipt, Xt as WaitForTransactionReceiptOptions, a as ContractCall, k as CoreThruputClient } from "./readViews-C_FX8wby.js";
|
|
3
|
+
import { t as Signer } from "./types-BE40oD_Q.js";
|
|
4
|
+
import { t as SignerEntry } from "./sign-Ve0eetRO.js";
|
|
5
|
+
import { AuthClaim, AuthClaimType, BitMap, BlockHeight, Contract, ContractAddress, GasAmount, Invocation, PublicKey, SHA256Hash, Transaction, Weight } from "@thruputchain/protocol";
|
|
6
|
+
|
|
7
|
+
//#region src/wallet/account.d.ts
|
|
8
|
+
interface WalletAccountBase {
|
|
9
|
+
readonly address: ContractAddress;
|
|
10
|
+
readonly authClaim: AuthClaim;
|
|
11
|
+
readonly signers: readonly SignerEntry[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Protocol pubkey account authorized directly by one Ed25519 or ML-DSA-65 key.
|
|
15
|
+
*
|
|
16
|
+
* The auth claim names the key by its scheme-inclusive hash; the key itself is
|
|
17
|
+
* attached to each signed transaction as `pubkey_claim_key`.
|
|
18
|
+
*/
|
|
19
|
+
interface PubkeyAccount extends WalletAccountBase {
|
|
20
|
+
readonly kind: "pubkey";
|
|
21
|
+
readonly nonce: bigint;
|
|
22
|
+
/** Scheme-tagged key the account's address commits to. */
|
|
23
|
+
readonly publicKey: PublicKey;
|
|
24
|
+
readonly authClaim: Extract<AuthClaim, {
|
|
25
|
+
claim_type: AuthClaimType.kPubkeySignature;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
/** Existing account contract authorized through source-address auth data. */
|
|
29
|
+
interface SourceAddressAccount extends WalletAccountBase {
|
|
30
|
+
readonly kind: "sourceAddress";
|
|
31
|
+
readonly authClaim: Extract<AuthClaim, {
|
|
32
|
+
claim_type: AuthClaimType.kSourceAddressAuthData;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
/** Account configuration accepted by {@link createWalletClient}. */
|
|
36
|
+
type WalletAccount = PubkeyAccount | SourceAddressAccount;
|
|
37
|
+
/** Options for {@link createPubkeyAccount}. */
|
|
38
|
+
interface CreatePubkeyAccountOptions {
|
|
39
|
+
readonly signer: Signer;
|
|
40
|
+
/** Address-derivation nonce. Defaults to zero. */
|
|
41
|
+
readonly nonce?: bigint;
|
|
42
|
+
}
|
|
43
|
+
/** Options for {@link createSourceAddressAccount}. */
|
|
44
|
+
interface CreateSourceAddressAccountOptions {
|
|
45
|
+
readonly address: ContractAddress;
|
|
46
|
+
readonly signers: readonly SignerEntry[];
|
|
47
|
+
readonly allowedKeys: BitMap;
|
|
48
|
+
readonly requiredWeight: Weight;
|
|
49
|
+
}
|
|
50
|
+
/** Create a protocol `kPubkeySignature` account. */
|
|
51
|
+
declare function createPubkeyAccount(options: CreatePubkeyAccountOptions): PubkeyAccount;
|
|
52
|
+
/** Create an account using the protocol's `kSourceAddressAuthData` mode. */
|
|
53
|
+
declare function createSourceAddressAccount(options: CreateSourceAddressAccountOptions): SourceAddressAccount;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/actions/wallet/prepareTransaction.d.ts
|
|
56
|
+
/** Inputs for preparing one wallet-authorized transaction. */
|
|
57
|
+
interface PrepareTransactionRequest {
|
|
58
|
+
/** Explicit root invocation. Smart-wallet wrapping is caller-controlled. */
|
|
59
|
+
readonly invocation: Invocation;
|
|
60
|
+
readonly contractsToDeploy?: readonly Contract[];
|
|
61
|
+
readonly nonce?: bigint;
|
|
62
|
+
readonly blockExpiryHeight?: BlockHeight;
|
|
63
|
+
readonly expiryBlocks?: bigint;
|
|
64
|
+
}
|
|
65
|
+
/** Prepare an unsigned transaction for a wallet account. */
|
|
66
|
+
declare function prepareTransaction(client: Pick<CoreThruputClient, "getChainTip">, account: Pick<WalletAccount, "address" | "authClaim">, request: PrepareTransactionRequest): Promise<Transaction>;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/wallet/deployment.d.ts
|
|
69
|
+
/** Stable deployment identity, available before transaction preparation. */
|
|
70
|
+
interface ContractDeployment {
|
|
71
|
+
readonly contract: Contract;
|
|
72
|
+
readonly deployer: ContractAddress;
|
|
73
|
+
readonly deploymentNonce: SHA256Hash;
|
|
74
|
+
readonly contractHash: SHA256Hash;
|
|
75
|
+
readonly address: ContractAddress;
|
|
76
|
+
}
|
|
77
|
+
/** Explicit effects and gas budgets for one atomic wallet deployment. */
|
|
78
|
+
interface DeploymentOptions {
|
|
79
|
+
/** Gas available to the complete wallet root. */
|
|
80
|
+
readonly gasLimit: GasAmount;
|
|
81
|
+
/**
|
|
82
|
+
* Exact raw native-token amount to transfer to the target, from zero to
|
|
83
|
+
* the i128 maximum. Zero skips funding.
|
|
84
|
+
*/
|
|
85
|
+
readonly amount: bigint;
|
|
86
|
+
/**
|
|
87
|
+
* Optional ordinary call to the predicted deployment address. Build it with
|
|
88
|
+
* a generated method's invocation API. The caller is the wallet; return data
|
|
89
|
+
* is discarded. Failure rolls back funding, deployment and initialization.
|
|
90
|
+
*/
|
|
91
|
+
readonly initializer?: Invocation;
|
|
92
|
+
}
|
|
93
|
+
/** Wrap raw RV32 artifact bytes in the canonical protocol Contract. */
|
|
94
|
+
declare function rv32Contract(artifact: Uint8Array): Contract;
|
|
95
|
+
/**
|
|
96
|
+
* Hash canonical contract encoding and predict the address without creating an
|
|
97
|
+
* expiring transaction. Funding and initialization are explicit deployment options;
|
|
98
|
+
* this helper performs neither. The deployment nonce differs from the transaction
|
|
99
|
+
* nonce. Factory-created contracts remain factory calls with attached code.
|
|
100
|
+
*/
|
|
101
|
+
declare function prepareContractDeployment(input: {
|
|
102
|
+
deployer: ContractAddress;
|
|
103
|
+
contract: Contract | Uint8Array;
|
|
104
|
+
deploymentNonce?: Uint8Array;
|
|
105
|
+
}): ContractDeployment;
|
|
106
|
+
/** Verify committed deployment evidence against the predicted address. */
|
|
107
|
+
declare function decodeDeployment(receipt: TransactionReceipt, deployment: ContractDeployment, adapter: WalletInvocationAdapter, submission?: SubmissionEvidence): ContractAddress;
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/wallet/invocationAdapter.d.ts
|
|
110
|
+
/** Common inputs for wrapping one inner invocation through a wallet contract. */
|
|
111
|
+
interface WalletExecutionRequest {
|
|
112
|
+
readonly invocation: Invocation;
|
|
113
|
+
/** Gas available to the wallet's root invocation. */
|
|
114
|
+
readonly gasLimit: GasAmount;
|
|
115
|
+
}
|
|
116
|
+
/** Ordered inner calls for one atomic DefaultWallet execution. */
|
|
117
|
+
interface WalletBatchExecutionRequest {
|
|
118
|
+
readonly invocations: readonly Invocation[];
|
|
119
|
+
/** Gas available to the complete wallet root, including all calls. */
|
|
120
|
+
readonly gasLimit: GasAmount;
|
|
121
|
+
}
|
|
122
|
+
/** Build a root batch directly, copying call bytes before asynchronous work. */
|
|
123
|
+
declare function createDefaultWalletBatchInvocation(accountAddress: ContractAddress, request: WalletBatchExecutionRequest): Invocation;
|
|
124
|
+
/** Converts a wallet-specific execution request into a root invocation. */
|
|
125
|
+
interface WalletInvocationAdapter<TRequest extends WalletExecutionRequest = WalletExecutionRequest> {
|
|
126
|
+
/** Build a root deployment when supported by this wallet. */
|
|
127
|
+
createDeploymentInvocation?(account: ContractAddress, deployment: ContractDeployment, options: DeploymentOptions): Invocation;
|
|
128
|
+
/** Decode the address returned by a root deployment. */
|
|
129
|
+
decodeDeploymentReceipt?(receipt: TransactionReceipt): ContractAddress;
|
|
130
|
+
/** Child return buffers in call order, or null when this wallet discards them. */
|
|
131
|
+
decodeExecutionReturns?(receipt: TransactionReceipt): readonly Uint8Array[] | null;
|
|
132
|
+
/** Build one atomic root for multiple calls when this wallet supports it. */
|
|
133
|
+
createBatchRootInvocation?(account: ContractAddress, request: WalletBatchExecutionRequest): Invocation;
|
|
134
|
+
createRootInvocation(accountAddress: ContractAddress, request: TRequest): Invocation;
|
|
135
|
+
}
|
|
136
|
+
/** Define an invocation adapter while preserving its request type. */
|
|
137
|
+
declare function defineWalletInvocationAdapter<TRequest extends WalletExecutionRequest>(adapter: WalletInvocationAdapter<TRequest>): WalletInvocationAdapter<TRequest>;
|
|
138
|
+
/** Wrap one call through the native-compatible DefaultWallet interface. */
|
|
139
|
+
declare const defaultWalletAdapter: WalletInvocationAdapter<WalletExecutionRequest>;
|
|
140
|
+
/** Wrap one call through the legacy DevWallet. Unified deployment is unsupported. */
|
|
141
|
+
declare const devWalletAdapter: WalletInvocationAdapter<WalletExecutionRequest>;
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/wallet/execution.d.ts
|
|
144
|
+
/** A committed execution failure, retaining the complete native receipt. */
|
|
145
|
+
declare class TransactionExecutionError extends Error {
|
|
146
|
+
readonly receipt: TransactionReceipt;
|
|
147
|
+
readonly submission?: SubmissionEvidence | undefined;
|
|
148
|
+
constructor(receipt: TransactionReceipt, submission?: SubmissionEvidence | undefined);
|
|
149
|
+
}
|
|
150
|
+
/** A future execution variant is unsupported, never inferred to be success or failure. */
|
|
151
|
+
declare class UnsupportedTransactionOutcomeError extends TransactionExecutionError {
|
|
152
|
+
constructor(receipt: TransactionReceipt, submission?: SubmissionEvidence);
|
|
153
|
+
}
|
|
154
|
+
declare function assertTransactionSuccess(receipt: TransactionReceipt, submission?: SubmissionEvidence): asserts receipt is TransactionReceipt & {
|
|
155
|
+
execution: {
|
|
156
|
+
result: "return";
|
|
157
|
+
returnData: Uint8Array;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/** A submit response that does not establish the currently supported admission outcome. */
|
|
161
|
+
declare class UnsupportedTransactionAdmissionError extends Error {
|
|
162
|
+
readonly response: RpcSendTransactionResult;
|
|
163
|
+
constructor(response: RpcSendTransactionResult);
|
|
164
|
+
}
|
|
165
|
+
/** Keep low-level future values intact, but never project them into an admitted hash. */
|
|
166
|
+
declare function assertTransactionAdmission(response: RpcSendTransactionResult): void;
|
|
167
|
+
interface SubmissionEvidence {
|
|
168
|
+
readonly signedTransaction: Uint8Array;
|
|
169
|
+
readonly transactionHash: Uint8Array;
|
|
170
|
+
readonly networkHash: Uint8Array;
|
|
171
|
+
}
|
|
172
|
+
/** Snapshot approved bytes before submission; accessor copies protect the retained record. */
|
|
173
|
+
declare function createSubmissionEvidence(bytes: Uint8Array, network: Uint8Array): SubmissionEvidence;
|
|
174
|
+
interface ExecutionResult {
|
|
175
|
+
transactionHash: Uint8Array;
|
|
176
|
+
receipt: TransactionReceipt;
|
|
177
|
+
submission?: SubmissionEvidence;
|
|
178
|
+
}
|
|
179
|
+
/** Submission or observation stopped, preserving exact approved bytes and commitment. */
|
|
180
|
+
declare class TransactionObservationError extends Error {
|
|
181
|
+
readonly submission: SubmissionEvidence;
|
|
182
|
+
readonly submissionCause?: unknown | undefined;
|
|
183
|
+
readonly knownCommitment?: KnownCommitment | undefined;
|
|
184
|
+
readonly phase: "beforeSubmission" | "submission" | "observation";
|
|
185
|
+
constructor(submission: SubmissionEvidence, cause: unknown, submissionCause?: unknown | undefined, knownCommitment?: KnownCommitment | undefined, phase?: "beforeSubmission" | "submission" | "observation");
|
|
186
|
+
get transactionHash(): Uint8Array;
|
|
187
|
+
}
|
|
188
|
+
/** Submit once, then reconcile only by reads. No path replaces or repeats signed bytes. */
|
|
189
|
+
declare function submitAndObserve(client: Pick<CoreThruputClient, "waitForTransactionReceipt">, evidence: SubmissionEvidence, submit: (signal: AbortSignal) => Promise<void>, options?: WaitForTransactionReceiptOptions, wasDispatched?: () => boolean): Promise<ExecutionResult>;
|
|
190
|
+
/** Wait for a committed receipt, then require execution success. */
|
|
191
|
+
declare function waitForExecution(client: Pick<CoreThruputClient, "waitForTransactionReceipt">, hash: Uint8Array, options?: WaitForTransactionReceiptOptions): Promise<ExecutionResult>;
|
|
192
|
+
/** Ordered result types for a tuple of calls. */
|
|
193
|
+
type CallResults<T extends readonly ContractCall[]> = { [K in keyof T]: T[K] extends ContractCall<infer R> ? R : never };
|
|
194
|
+
/**
|
|
195
|
+
* Decode DefaultWallet child returns without modifying the root receipt.
|
|
196
|
+
* Works after disconnect and preserves call order. Supply an adapter for other
|
|
197
|
+
* wallets. Wallets such as DevWallet that discard child return data report
|
|
198
|
+
* unavailable results. Failed wallet receipts are not decoded with a child ABI:
|
|
199
|
+
* even a single child call does not establish where an abort originated.
|
|
200
|
+
*/
|
|
201
|
+
declare function decodeExecution<T extends readonly ContractCall[]>(receipt: TransactionReceipt, calls: T, adapter?: WalletInvocationAdapter, submission?: SubmissionEvidence): CallResults<T>;
|
|
202
|
+
/** A committed successful execution whose return data could not be decoded. */
|
|
203
|
+
declare class ExecutionDecodeError extends Error {
|
|
204
|
+
readonly receipt: TransactionReceipt;
|
|
205
|
+
readonly submission?: SubmissionEvidence | undefined;
|
|
206
|
+
constructor(receipt: TransactionReceipt, cause: unknown, submission?: SubmissionEvidence | undefined);
|
|
207
|
+
}
|
|
208
|
+
/** Execution succeeded, but this wallet does not preserve child return buffers. */
|
|
209
|
+
declare class ExecutionReturnUnavailableError extends Error {
|
|
210
|
+
readonly receipt: TransactionReceipt;
|
|
211
|
+
readonly submission?: SubmissionEvidence | undefined;
|
|
212
|
+
constructor(receipt: TransactionReceipt, submission?: SubmissionEvidence | undefined);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Sum explicit child budgets and a calibrated wallet overhead, checking u64 bounds.
|
|
216
|
+
* This is not gas estimation. Calibrate budgets against the target runtime and
|
|
217
|
+
* workload; there is no universally safe wallet overhead. Root gas reserves
|
|
218
|
+
* scheduling capacity against the sender's free native-token balance. Storage
|
|
219
|
+
* deposits are a separate requirement, and funding a target contract does not
|
|
220
|
+
* sponsor root gas.
|
|
221
|
+
*/
|
|
222
|
+
declare function walletGasLimit(calls: readonly {
|
|
223
|
+
gas_limit: GasAmount;
|
|
224
|
+
}[], overhead: GasAmount): GasAmount;
|
|
225
|
+
//#endregion
|
|
226
|
+
export { prepareTransaction as A, devWalletAdapter as C, prepareContractDeployment as D, decodeDeployment as E, WalletAccount as F, createPubkeyAccount as I, createSourceAddressAccount as L, CreateSourceAddressAccountOptions as M, PubkeyAccount as N, rv32Contract as O, SourceAddressAccount as P, defineWalletInvocationAdapter as S, DeploymentOptions as T, WalletBatchExecutionRequest as _, SubmissionEvidence as a, createDefaultWalletBatchInvocation as b, UnsupportedTransactionAdmissionError as c, assertTransactionSuccess as d, createSubmissionEvidence as f, walletGasLimit as g, waitForExecution as h, ExecutionReturnUnavailableError as i, CreatePubkeyAccountOptions as j, PrepareTransactionRequest as k, UnsupportedTransactionOutcomeError as l, submitAndObserve as m, ExecutionDecodeError as n, TransactionExecutionError as o, decodeExecution as p, ExecutionResult as r, TransactionObservationError as s, CallResults as t, assertTransactionAdmission as u, WalletExecutionRequest as v, ContractDeployment as w, defaultWalletAdapter as x, WalletInvocationAdapter as y };
|
|
227
|
+
//# sourceMappingURL=execution-CRDyKu45.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-CRDyKu45.d.ts","names":[],"sources":["../src/wallet/account.ts","../src/actions/wallet/prepareTransaction.ts","../src/wallet/deployment.ts","../src/wallet/invocationAdapter.ts","../src/wallet/execution.ts"],"mappings":";;;;;;;UA2BU,iBAAA;EAAA,SACC,OAAA,EAAS,eAAA;EAAA,SACT,SAAA,EAAW,SAAA;EAAA,SACX,OAAA,WAAkB,WAAA;AAAA;;;;;;;UASZ,aAAA,SA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BACC,OAAA,CAAQ,eAAA;;iBAwFW,gBAAA,CACpB,MAAA,EAAQ,IAAA,CAAK,iBAAA,gCACb,IAAA,EAAM,UAAA,EACN,OAAA,GAAU,gCAAA,GACT,OAAA,CAAQ,eAAA;;KAOC,WAAA,oBAA+B,YAAA,oBAC7B,CAAA,GAAI,CAAA,CAAE,CAAA,UAAW,YAAA,YAAwB,CAAA;;;;;AJrLD;AAKtD;;iBI0LgB,eAAA,oBAAmC,YAAA,IACjD,OAAA,EAAS,kBAAA,EACT,KAAA,EAAO,CAAA,EACP,OAAA,GAAS,uBAAA,EACT,UAAA,GAAa,kBAAA,GACZ,WAAA,CAAY,CAAA;;cAqBF,oBAAA,SAA6B,KAAA;EAAA,SAE7B,OAAA,EAAS,kBAAA;EAAA,SAET,UAAA,GAAa,kBAAA;cAFb,OAAA,EAAS,kBAAA,EAClB,KAAA,WACS,UAAA,GAAa,kBAAA;AAAA;;cAWb,+BAAA,SAAwC,KAAA;EAAA,SAExC,OAAA,EAAS,kBAAA;EAAA,SACT,UAAA,GAAa,kBAAA;cADb,OAAA,EAAS,kBAAA,EACT,UAAA,GAAa,kBAAA;AAAA;;;;;;;;;iBAiBV,cAAA,CACd,KAAA;EAAkB,SAAA,EAAW,SAAA;AAAA,KAC7B,QAAA,EAAU,SAAA,GACT,SAAA"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { tt as RpcSendTransactionResult } from "./client-BxB6ktQd.cjs";
|
|
2
|
+
import { Kt as KnownCommitment, Ln as TransactionReceipt, Xt as WaitForTransactionReceiptOptions, a as ContractCall, k as CoreThruputClient } from "./readViews-BKJtE5J3.cjs";
|
|
3
|
+
import { t as Signer } from "./types-BE40oD_Q.cjs";
|
|
4
|
+
import { t as SignerEntry } from "./sign-eUT0iGQG.cjs";
|
|
5
|
+
import { AuthClaim, AuthClaimType, BitMap, BlockHeight, Contract, ContractAddress, GasAmount, Invocation, PublicKey, SHA256Hash, Transaction, Weight } from "@thruputchain/protocol";
|
|
6
|
+
|
|
7
|
+
//#region src/wallet/account.d.ts
|
|
8
|
+
interface WalletAccountBase {
|
|
9
|
+
readonly address: ContractAddress;
|
|
10
|
+
readonly authClaim: AuthClaim;
|
|
11
|
+
readonly signers: readonly SignerEntry[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Protocol pubkey account authorized directly by one Ed25519 or ML-DSA-65 key.
|
|
15
|
+
*
|
|
16
|
+
* The auth claim names the key by its scheme-inclusive hash; the key itself is
|
|
17
|
+
* attached to each signed transaction as `pubkey_claim_key`.
|
|
18
|
+
*/
|
|
19
|
+
interface PubkeyAccount extends WalletAccountBase {
|
|
20
|
+
readonly kind: "pubkey";
|
|
21
|
+
readonly nonce: bigint;
|
|
22
|
+
/** Scheme-tagged key the account's address commits to. */
|
|
23
|
+
readonly publicKey: PublicKey;
|
|
24
|
+
readonly authClaim: Extract<AuthClaim, {
|
|
25
|
+
claim_type: AuthClaimType.kPubkeySignature;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
/** Existing account contract authorized through source-address auth data. */
|
|
29
|
+
interface SourceAddressAccount extends WalletAccountBase {
|
|
30
|
+
readonly kind: "sourceAddress";
|
|
31
|
+
readonly authClaim: Extract<AuthClaim, {
|
|
32
|
+
claim_type: AuthClaimType.kSourceAddressAuthData;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
/** Account configuration accepted by {@link createWalletClient}. */
|
|
36
|
+
type WalletAccount = PubkeyAccount | SourceAddressAccount;
|
|
37
|
+
/** Options for {@link createPubkeyAccount}. */
|
|
38
|
+
interface CreatePubkeyAccountOptions {
|
|
39
|
+
readonly signer: Signer;
|
|
40
|
+
/** Address-derivation nonce. Defaults to zero. */
|
|
41
|
+
readonly nonce?: bigint;
|
|
42
|
+
}
|
|
43
|
+
/** Options for {@link createSourceAddressAccount}. */
|
|
44
|
+
interface CreateSourceAddressAccountOptions {
|
|
45
|
+
readonly address: ContractAddress;
|
|
46
|
+
readonly signers: readonly SignerEntry[];
|
|
47
|
+
readonly allowedKeys: BitMap;
|
|
48
|
+
readonly requiredWeight: Weight;
|
|
49
|
+
}
|
|
50
|
+
/** Create a protocol `kPubkeySignature` account. */
|
|
51
|
+
declare function createPubkeyAccount(options: CreatePubkeyAccountOptions): PubkeyAccount;
|
|
52
|
+
/** Create an account using the protocol's `kSourceAddressAuthData` mode. */
|
|
53
|
+
declare function createSourceAddressAccount(options: CreateSourceAddressAccountOptions): SourceAddressAccount;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/actions/wallet/prepareTransaction.d.ts
|
|
56
|
+
/** Inputs for preparing one wallet-authorized transaction. */
|
|
57
|
+
interface PrepareTransactionRequest {
|
|
58
|
+
/** Explicit root invocation. Smart-wallet wrapping is caller-controlled. */
|
|
59
|
+
readonly invocation: Invocation;
|
|
60
|
+
readonly contractsToDeploy?: readonly Contract[];
|
|
61
|
+
readonly nonce?: bigint;
|
|
62
|
+
readonly blockExpiryHeight?: BlockHeight;
|
|
63
|
+
readonly expiryBlocks?: bigint;
|
|
64
|
+
}
|
|
65
|
+
/** Prepare an unsigned transaction for a wallet account. */
|
|
66
|
+
declare function prepareTransaction(client: Pick<CoreThruputClient, "getChainTip">, account: Pick<WalletAccount, "address" | "authClaim">, request: PrepareTransactionRequest): Promise<Transaction>;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/wallet/deployment.d.ts
|
|
69
|
+
/** Stable deployment identity, available before transaction preparation. */
|
|
70
|
+
interface ContractDeployment {
|
|
71
|
+
readonly contract: Contract;
|
|
72
|
+
readonly deployer: ContractAddress;
|
|
73
|
+
readonly deploymentNonce: SHA256Hash;
|
|
74
|
+
readonly contractHash: SHA256Hash;
|
|
75
|
+
readonly address: ContractAddress;
|
|
76
|
+
}
|
|
77
|
+
/** Explicit effects and gas budgets for one atomic wallet deployment. */
|
|
78
|
+
interface DeploymentOptions {
|
|
79
|
+
/** Gas available to the complete wallet root. */
|
|
80
|
+
readonly gasLimit: GasAmount;
|
|
81
|
+
/**
|
|
82
|
+
* Exact raw native-token amount to transfer to the target, from zero to
|
|
83
|
+
* the i128 maximum. Zero skips funding.
|
|
84
|
+
*/
|
|
85
|
+
readonly amount: bigint;
|
|
86
|
+
/**
|
|
87
|
+
* Optional ordinary call to the predicted deployment address. Build it with
|
|
88
|
+
* a generated method's invocation API. The caller is the wallet; return data
|
|
89
|
+
* is discarded. Failure rolls back funding, deployment and initialization.
|
|
90
|
+
*/
|
|
91
|
+
readonly initializer?: Invocation;
|
|
92
|
+
}
|
|
93
|
+
/** Wrap raw RV32 artifact bytes in the canonical protocol Contract. */
|
|
94
|
+
declare function rv32Contract(artifact: Uint8Array): Contract;
|
|
95
|
+
/**
|
|
96
|
+
* Hash canonical contract encoding and predict the address without creating an
|
|
97
|
+
* expiring transaction. Funding and initialization are explicit deployment options;
|
|
98
|
+
* this helper performs neither. The deployment nonce differs from the transaction
|
|
99
|
+
* nonce. Factory-created contracts remain factory calls with attached code.
|
|
100
|
+
*/
|
|
101
|
+
declare function prepareContractDeployment(input: {
|
|
102
|
+
deployer: ContractAddress;
|
|
103
|
+
contract: Contract | Uint8Array;
|
|
104
|
+
deploymentNonce?: Uint8Array;
|
|
105
|
+
}): ContractDeployment;
|
|
106
|
+
/** Verify committed deployment evidence against the predicted address. */
|
|
107
|
+
declare function decodeDeployment(receipt: TransactionReceipt, deployment: ContractDeployment, adapter: WalletInvocationAdapter, submission?: SubmissionEvidence): ContractAddress;
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/wallet/invocationAdapter.d.ts
|
|
110
|
+
/** Common inputs for wrapping one inner invocation through a wallet contract. */
|
|
111
|
+
interface WalletExecutionRequest {
|
|
112
|
+
readonly invocation: Invocation;
|
|
113
|
+
/** Gas available to the wallet's root invocation. */
|
|
114
|
+
readonly gasLimit: GasAmount;
|
|
115
|
+
}
|
|
116
|
+
/** Ordered inner calls for one atomic DefaultWallet execution. */
|
|
117
|
+
interface WalletBatchExecutionRequest {
|
|
118
|
+
readonly invocations: readonly Invocation[];
|
|
119
|
+
/** Gas available to the complete wallet root, including all calls. */
|
|
120
|
+
readonly gasLimit: GasAmount;
|
|
121
|
+
}
|
|
122
|
+
/** Build a root batch directly, copying call bytes before asynchronous work. */
|
|
123
|
+
declare function createDefaultWalletBatchInvocation(accountAddress: ContractAddress, request: WalletBatchExecutionRequest): Invocation;
|
|
124
|
+
/** Converts a wallet-specific execution request into a root invocation. */
|
|
125
|
+
interface WalletInvocationAdapter<TRequest extends WalletExecutionRequest = WalletExecutionRequest> {
|
|
126
|
+
/** Build a root deployment when supported by this wallet. */
|
|
127
|
+
createDeploymentInvocation?(account: ContractAddress, deployment: ContractDeployment, options: DeploymentOptions): Invocation;
|
|
128
|
+
/** Decode the address returned by a root deployment. */
|
|
129
|
+
decodeDeploymentReceipt?(receipt: TransactionReceipt): ContractAddress;
|
|
130
|
+
/** Child return buffers in call order, or null when this wallet discards them. */
|
|
131
|
+
decodeExecutionReturns?(receipt: TransactionReceipt): readonly Uint8Array[] | null;
|
|
132
|
+
/** Build one atomic root for multiple calls when this wallet supports it. */
|
|
133
|
+
createBatchRootInvocation?(account: ContractAddress, request: WalletBatchExecutionRequest): Invocation;
|
|
134
|
+
createRootInvocation(accountAddress: ContractAddress, request: TRequest): Invocation;
|
|
135
|
+
}
|
|
136
|
+
/** Define an invocation adapter while preserving its request type. */
|
|
137
|
+
declare function defineWalletInvocationAdapter<TRequest extends WalletExecutionRequest>(adapter: WalletInvocationAdapter<TRequest>): WalletInvocationAdapter<TRequest>;
|
|
138
|
+
/** Wrap one call through the native-compatible DefaultWallet interface. */
|
|
139
|
+
declare const defaultWalletAdapter: WalletInvocationAdapter<WalletExecutionRequest>;
|
|
140
|
+
/** Wrap one call through the legacy DevWallet. Unified deployment is unsupported. */
|
|
141
|
+
declare const devWalletAdapter: WalletInvocationAdapter<WalletExecutionRequest>;
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/wallet/execution.d.ts
|
|
144
|
+
/** A committed execution failure, retaining the complete native receipt. */
|
|
145
|
+
declare class TransactionExecutionError extends Error {
|
|
146
|
+
readonly receipt: TransactionReceipt;
|
|
147
|
+
readonly submission?: SubmissionEvidence | undefined;
|
|
148
|
+
constructor(receipt: TransactionReceipt, submission?: SubmissionEvidence | undefined);
|
|
149
|
+
}
|
|
150
|
+
/** A future execution variant is unsupported, never inferred to be success or failure. */
|
|
151
|
+
declare class UnsupportedTransactionOutcomeError extends TransactionExecutionError {
|
|
152
|
+
constructor(receipt: TransactionReceipt, submission?: SubmissionEvidence);
|
|
153
|
+
}
|
|
154
|
+
declare function assertTransactionSuccess(receipt: TransactionReceipt, submission?: SubmissionEvidence): asserts receipt is TransactionReceipt & {
|
|
155
|
+
execution: {
|
|
156
|
+
result: "return";
|
|
157
|
+
returnData: Uint8Array;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/** A submit response that does not establish the currently supported admission outcome. */
|
|
161
|
+
declare class UnsupportedTransactionAdmissionError extends Error {
|
|
162
|
+
readonly response: RpcSendTransactionResult;
|
|
163
|
+
constructor(response: RpcSendTransactionResult);
|
|
164
|
+
}
|
|
165
|
+
/** Keep low-level future values intact, but never project them into an admitted hash. */
|
|
166
|
+
declare function assertTransactionAdmission(response: RpcSendTransactionResult): void;
|
|
167
|
+
interface SubmissionEvidence {
|
|
168
|
+
readonly signedTransaction: Uint8Array;
|
|
169
|
+
readonly transactionHash: Uint8Array;
|
|
170
|
+
readonly networkHash: Uint8Array;
|
|
171
|
+
}
|
|
172
|
+
/** Snapshot approved bytes before submission; accessor copies protect the retained record. */
|
|
173
|
+
declare function createSubmissionEvidence(bytes: Uint8Array, network: Uint8Array): SubmissionEvidence;
|
|
174
|
+
interface ExecutionResult {
|
|
175
|
+
transactionHash: Uint8Array;
|
|
176
|
+
receipt: TransactionReceipt;
|
|
177
|
+
submission?: SubmissionEvidence;
|
|
178
|
+
}
|
|
179
|
+
/** Submission or observation stopped, preserving exact approved bytes and commitment. */
|
|
180
|
+
declare class TransactionObservationError extends Error {
|
|
181
|
+
readonly submission: SubmissionEvidence;
|
|
182
|
+
readonly submissionCause?: unknown | undefined;
|
|
183
|
+
readonly knownCommitment?: KnownCommitment | undefined;
|
|
184
|
+
readonly phase: "beforeSubmission" | "submission" | "observation";
|
|
185
|
+
constructor(submission: SubmissionEvidence, cause: unknown, submissionCause?: unknown | undefined, knownCommitment?: KnownCommitment | undefined, phase?: "beforeSubmission" | "submission" | "observation");
|
|
186
|
+
get transactionHash(): Uint8Array;
|
|
187
|
+
}
|
|
188
|
+
/** Submit once, then reconcile only by reads. No path replaces or repeats signed bytes. */
|
|
189
|
+
declare function submitAndObserve(client: Pick<CoreThruputClient, "waitForTransactionReceipt">, evidence: SubmissionEvidence, submit: (signal: AbortSignal) => Promise<void>, options?: WaitForTransactionReceiptOptions, wasDispatched?: () => boolean): Promise<ExecutionResult>;
|
|
190
|
+
/** Wait for a committed receipt, then require execution success. */
|
|
191
|
+
declare function waitForExecution(client: Pick<CoreThruputClient, "waitForTransactionReceipt">, hash: Uint8Array, options?: WaitForTransactionReceiptOptions): Promise<ExecutionResult>;
|
|
192
|
+
/** Ordered result types for a tuple of calls. */
|
|
193
|
+
type CallResults<T extends readonly ContractCall[]> = { [K in keyof T]: T[K] extends ContractCall<infer R> ? R : never };
|
|
194
|
+
/**
|
|
195
|
+
* Decode DefaultWallet child returns without modifying the root receipt.
|
|
196
|
+
* Works after disconnect and preserves call order. Supply an adapter for other
|
|
197
|
+
* wallets. Wallets such as DevWallet that discard child return data report
|
|
198
|
+
* unavailable results. Failed wallet receipts are not decoded with a child ABI:
|
|
199
|
+
* even a single child call does not establish where an abort originated.
|
|
200
|
+
*/
|
|
201
|
+
declare function decodeExecution<T extends readonly ContractCall[]>(receipt: TransactionReceipt, calls: T, adapter?: WalletInvocationAdapter, submission?: SubmissionEvidence): CallResults<T>;
|
|
202
|
+
/** A committed successful execution whose return data could not be decoded. */
|
|
203
|
+
declare class ExecutionDecodeError extends Error {
|
|
204
|
+
readonly receipt: TransactionReceipt;
|
|
205
|
+
readonly submission?: SubmissionEvidence | undefined;
|
|
206
|
+
constructor(receipt: TransactionReceipt, cause: unknown, submission?: SubmissionEvidence | undefined);
|
|
207
|
+
}
|
|
208
|
+
/** Execution succeeded, but this wallet does not preserve child return buffers. */
|
|
209
|
+
declare class ExecutionReturnUnavailableError extends Error {
|
|
210
|
+
readonly receipt: TransactionReceipt;
|
|
211
|
+
readonly submission?: SubmissionEvidence | undefined;
|
|
212
|
+
constructor(receipt: TransactionReceipt, submission?: SubmissionEvidence | undefined);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Sum explicit child budgets and a calibrated wallet overhead, checking u64 bounds.
|
|
216
|
+
* This is not gas estimation. Calibrate budgets against the target runtime and
|
|
217
|
+
* workload; there is no universally safe wallet overhead. Root gas reserves
|
|
218
|
+
* scheduling capacity against the sender's free native-token balance. Storage
|
|
219
|
+
* deposits are a separate requirement, and funding a target contract does not
|
|
220
|
+
* sponsor root gas.
|
|
221
|
+
*/
|
|
222
|
+
declare function walletGasLimit(calls: readonly {
|
|
223
|
+
gas_limit: GasAmount;
|
|
224
|
+
}[], overhead: GasAmount): GasAmount;
|
|
225
|
+
//#endregion
|
|
226
|
+
export { prepareTransaction as A, devWalletAdapter as C, prepareContractDeployment as D, decodeDeployment as E, WalletAccount as F, createPubkeyAccount as I, createSourceAddressAccount as L, CreateSourceAddressAccountOptions as M, PubkeyAccount as N, rv32Contract as O, SourceAddressAccount as P, defineWalletInvocationAdapter as S, DeploymentOptions as T, WalletBatchExecutionRequest as _, SubmissionEvidence as a, createDefaultWalletBatchInvocation as b, UnsupportedTransactionAdmissionError as c, assertTransactionSuccess as d, createSubmissionEvidence as f, walletGasLimit as g, waitForExecution as h, ExecutionReturnUnavailableError as i, CreatePubkeyAccountOptions as j, PrepareTransactionRequest as k, UnsupportedTransactionOutcomeError as l, submitAndObserve as m, ExecutionDecodeError as n, TransactionExecutionError as o, decodeExecution as p, ExecutionResult as r, TransactionObservationError as s, CallResults as t, assertTransactionAdmission as u, WalletExecutionRequest as v, ContractDeployment as w, defaultWalletAdapter as x, WalletInvocationAdapter as y };
|
|
227
|
+
//# sourceMappingURL=execution-DyxaIG4v.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-DyxaIG4v.d.cts","names":[],"sources":["../src/wallet/account.ts","../src/actions/wallet/prepareTransaction.ts","../src/wallet/deployment.ts","../src/wallet/invocationAdapter.ts","../src/wallet/execution.ts"],"mappings":";;;;;;;UA2BU,iBAAA;EAAA,SACC,OAAA,EAAS,eAAA;EAAA,SACT,SAAA,EAAW,SAAA;EAAA,SACX,OAAA,WAAkB,WAAA;AAAA;;;;;;;UASZ,aAAA,SAAsB,iBAAA;EAAA,SAC5B,IAAA;EAAA,SACA,KAAA;EAZA;EAAA,SAcA,SAAA,EAAW,SAAA;EAAA,SACX,SAAA,EAAW,OAAA,CAClB,SAAA;IACE,UAAA,EAAY,aAAA,CAAc,gBAAA;EAAA;AAAA;AAPhC;AAAA,UAYiB,oBAAA,SAA6B,iBAAA;EAAA,SACnC,IAAA;EAAA,SACA,SAAA,EAAW,OAAA,CAClB,SAAA;IACE,UAAA,EAAY,aAAA,CAAc,sBAAA;EAAA;AAAA;;KAKpB,aAAA,GAAgB,aAAA,GAAgB,oBAAoB;;UAG/C,0BAAA;EAAA,SACN,MAAA,EAAQ,MAAM;EAvBd;EAAA,SAyBA,KAAA;AAAA;;UAIM,iCAAA;EAAA,SACN,OAAA,EAAS,eAAA;EAAA,SACT,OAAA,WAAkB,WAAA;EAAA,SAClB,WAAA,EAAa,MAAA;EAAA,SACb,cAAA,EAAgB,MAAA;AAAA;AA5BqB;AAAA,iBAgChC,mBAAA,CACd,OAAA,EAAS,0BAAA,GACR,aAAa;;iBAuCA,0BAAA,CACd,OAAA,EAAS,iCAAA,GACR,oBAAoB;;;;UCtGN,yBAAA;;WAEN,UAAA,EAAY,UAAA;EAAA,SACZ,iB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