@thruputchain/client 0.27.0 → 0.29.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/README.md +120 -22
- package/dist/{actions-DK_XBeVy.cjs → actions-B2gV8Vzr.cjs} +297 -73
- package/dist/actions-B2gV8Vzr.cjs.map +1 -0
- package/dist/actions-UEYKD22C.js +653 -0
- package/dist/actions-UEYKD22C.js.map +1 -0
- package/dist/actions.cjs +4 -8
- 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.ts → artifact-RIAPVmVX.d.cts} +4 -3
- package/dist/artifact-RIAPVmVX.d.cts.map +1 -0
- package/dist/{artifact-BM_MVzhL.d.cts → artifact-RIAPVmVX.d.ts} +4 -3
- package/dist/artifact-RIAPVmVX.d.ts.map +1 -0
- package/dist/{contract-Cu8Qv94_.js → contract-BOlNskwd.js} +235 -87
- package/dist/contract-BOlNskwd.js.map +1 -0
- package/dist/{contract-DPm2BJTu.cjs → contract-D_vxUudr.cjs} +281 -109
- package/dist/contract-D_vxUudr.cjs.map +1 -0
- package/dist/contract.cjs +1 -5
- package/dist/contract.d.cts +4 -4
- package/dist/contract.d.ts +4 -4
- package/dist/contract.js +2 -2
- package/dist/contracts.cjs +5 -5
- package/dist/contracts.d.cts +19 -4
- package/dist/contracts.d.cts.map +1 -1
- package/dist/contracts.d.ts +19 -4
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +4 -4
- package/dist/decimal-BX7abv5J.cjs +171 -0
- package/dist/decimal-BX7abv5J.cjs.map +1 -0
- package/dist/decimal-CoHOISys.js +124 -0
- package/dist/decimal-CoHOISys.js.map +1 -0
- package/dist/{dev_wallet-BcvX_xT4.cjs → dev_wallet-BVChhV6j.cjs} +85 -6
- package/dist/dev_wallet-BVChhV6j.cjs.map +1 -0
- package/dist/{dev_wallet-B5R5JJaw.js → dev_wallet-D9LuPZ-h.js} +84 -5
- package/dist/dev_wallet-D9LuPZ-h.js.map +1 -0
- package/dist/{execution-C8oQgpO3.d.cts → execution-pSt6k620.d.cts} +23 -50
- package/dist/execution-pSt6k620.d.cts.map +1 -0
- package/dist/{execution-DsZzqv_C.d.ts → execution-uiuFPV0d.d.ts} +23 -50
- package/dist/execution-uiuFPV0d.d.ts.map +1 -0
- package/dist/{hex-DIcaALXL.js → hex-B8D-jBgz.js} +2 -2
- package/dist/{hex-DIcaALXL.js.map → hex-B8D-jBgz.js.map} +1 -1
- package/dist/{hex-DkGpiZ5e.cjs → hex-CSDZ9d6z.cjs} +2 -2
- package/dist/{hex-DkGpiZ5e.cjs.map → hex-CSDZ9d6z.cjs.map} +1 -1
- package/dist/{index-rrP1HJ2Z.d.cts → index-B1efA-Y_.d.ts} +24 -21
- package/dist/index-B1efA-Y_.d.ts.map +1 -0
- package/dist/{index-Zaz-e8Sy.d.ts → index-BGmH_Sm7.d.cts} +12 -62
- package/dist/index-BGmH_Sm7.d.cts.map +1 -0
- package/dist/{index-CHnfHuQo.d.ts → index-BZ5j5P5d.d.ts} +11 -9
- package/dist/index-BZ5j5P5d.d.ts.map +1 -0
- package/dist/{index-BmQN3jAS.d.cts → index-BfYEEVHm.d.cts} +3 -13
- package/dist/index-BfYEEVHm.d.cts.map +1 -0
- package/dist/{index-CuzB95QT.d.cts → index-BhOeIyrZ.d.cts} +11 -9
- package/dist/index-BhOeIyrZ.d.cts.map +1 -0
- package/dist/{index-B5KqSHeL.d.cts → index-BsvYcU_Y.d.cts} +2 -2
- package/dist/{index-B5KqSHeL.d.cts.map → index-BsvYcU_Y.d.cts.map} +1 -1
- package/dist/{index-hqEnT64w.d.ts → index-Btl_jMCT.d.ts} +3 -13
- package/dist/index-Btl_jMCT.d.ts.map +1 -0
- package/dist/{index-C3qDR1J5.d.cts → index-CG-q0j9w.d.ts} +12 -62
- package/dist/index-CG-q0j9w.d.ts.map +1 -0
- package/dist/index-CPtBvHE8.d.ts +145 -0
- package/dist/index-CPtBvHE8.d.ts.map +1 -0
- package/dist/{index-CKqC9N4o.d.ts → index-DBKsOzCN.d.cts} +24 -21
- package/dist/index-DBKsOzCN.d.cts.map +1 -0
- package/dist/index-Xre-0Jka.d.cts +145 -0
- package/dist/index-Xre-0Jka.d.cts.map +1 -0
- package/dist/index.cjs +39 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -17
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +12 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -38
- package/dist/index.js.map +1 -1
- package/dist/provider.cjs +3 -3
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +3 -3
- package/dist/provider.js.map +1 -1
- package/dist/{codec-BOjoJjC5.js → readError-B3Rz7rgs.js} +673 -56
- package/dist/readError-B3Rz7rgs.js.map +1 -0
- package/dist/{codec-C4LJ0g8v.cjs → readError-COcEDNoZ.cjs} +677 -96
- package/dist/readError-COcEDNoZ.cjs.map +1 -0
- package/dist/requestAirdrop-DBCOST2B.d.ts +1818 -0
- package/dist/requestAirdrop-DBCOST2B.d.ts.map +1 -0
- package/dist/requestAirdrop-T1eVn3l5.d.cts +1818 -0
- package/dist/requestAirdrop-T1eVn3l5.d.cts.map +1 -0
- package/dist/sendInvocation-185ZJrta.cjs +583 -0
- package/dist/sendInvocation-185ZJrta.cjs.map +1 -0
- package/dist/sendInvocation-DBaNWhr3.js +439 -0
- package/dist/sendInvocation-DBaNWhr3.js.map +1 -0
- package/dist/signed-op.cjs +2 -2
- package/dist/signed-op.d.cts +2 -2
- package/dist/signed-op.d.ts +1 -1
- package/dist/signed-op.js +2 -2
- package/dist/{signedOp-BDUZhfJn.cjs → signedOp-CVyeJ5ig.cjs} +3 -3
- package/dist/{signedOp-BDUZhfJn.cjs.map → signedOp-CVyeJ5ig.cjs.map} +1 -1
- package/dist/{signedOp-Kx8u8_3I.js → signedOp-D6WYZG9j.js} +3 -3
- package/dist/{signedOp-Kx8u8_3I.js.map → signedOp-D6WYZG9j.js.map} +1 -1
- package/dist/{signed_op-CAcYYRm6.cjs → signed_op-BBsDKOlD.cjs} +4 -4
- package/dist/{signed_op-CAcYYRm6.cjs.map → signed_op-BBsDKOlD.cjs.map} +1 -1
- package/dist/{signed_op-BrLxDrDb.d.cts → signed_op-BvbOHWKK.d.ts} +3 -3
- package/dist/{signed_op-DbRq3_Hb.d.ts.map → signed_op-BvbOHWKK.d.ts.map} +1 -1
- package/dist/{signed_op-DbRq3_Hb.d.ts → signed_op-DoHFpSH4.d.cts} +3 -3
- package/dist/{signed_op-BrLxDrDb.d.cts.map → signed_op-DoHFpSH4.d.cts.map} +1 -1
- package/dist/{signed_op-Dxn7-lRu.js → signed_op-h9X9-vBL.js} +3 -3
- package/dist/{signed_op-Dxn7-lRu.js.map → signed_op-h9X9-vBL.js.map} +1 -1
- package/dist/transport-BhWZxHcz.cjs +528 -0
- package/dist/transport-BhWZxHcz.cjs.map +1 -0
- package/dist/transport-EyDYuibb.js +504 -0
- package/dist/transport-EyDYuibb.js.map +1 -0
- package/dist/transport.cjs +6 -13
- package/dist/transport.d.cts +3 -3
- package/dist/transport.d.ts +3 -3
- package/dist/transport.js +4 -4
- package/dist/types-VYjJcTip.d.cts +161 -0
- package/dist/types-VYjJcTip.d.cts.map +1 -0
- package/dist/types-VYjJcTip.d.ts +161 -0
- package/dist/types-VYjJcTip.d.ts.map +1 -0
- package/dist/{validation-eXATmgO0.js → validation-BLQ64Dfh.js} +3 -3
- package/dist/validation-BLQ64Dfh.js.map +1 -0
- package/dist/{validation-4w-vDGAi.cjs → validation-CZqtmMLJ.cjs} +3 -3
- package/dist/validation-CZqtmMLJ.cjs.map +1 -0
- package/dist/{wallet-5wt9wLG3.js → wallet-NlZiI4-3.js} +161 -77
- package/dist/wallet-NlZiI4-3.js.map +1 -0
- package/dist/{wallet-Blh7oas7.cjs → wallet-UvyXtxh5.cjs} +161 -77
- package/dist/wallet-UvyXtxh5.cjs.map +1 -0
- package/dist/wallet.cjs +2 -8
- package/dist/wallet.d.cts +4 -3
- package/dist/wallet.d.ts +4 -3
- package/dist/wallet.js +3 -3
- package/package.json +2 -2
- package/dist/actions-1LmkZcfS.js +0 -430
- package/dist/actions-1LmkZcfS.js.map +0 -1
- package/dist/actions-DK_XBeVy.cjs.map +0 -1
- package/dist/artifact-BM_MVzhL.d.cts.map +0 -1
- package/dist/artifact-BM_MVzhL.d.ts.map +0 -1
- package/dist/client-DocSdzOL.d.cts +0 -790
- package/dist/client-DocSdzOL.d.cts.map +0 -1
- package/dist/client-DocSdzOL.d.ts +0 -790
- package/dist/client-DocSdzOL.d.ts.map +0 -1
- package/dist/codec-BOjoJjC5.js.map +0 -1
- package/dist/codec-C4LJ0g8v.cjs.map +0 -1
- package/dist/contract-Cu8Qv94_.js.map +0 -1
- package/dist/contract-DPm2BJTu.cjs.map +0 -1
- package/dist/dev_wallet-B5R5JJaw.js.map +0 -1
- package/dist/dev_wallet-BcvX_xT4.cjs.map +0 -1
- package/dist/execution-C8oQgpO3.d.cts.map +0 -1
- package/dist/execution-DsZzqv_C.d.ts.map +0 -1
- package/dist/index-BmQN3jAS.d.cts.map +0 -1
- package/dist/index-C3qDR1J5.d.cts.map +0 -1
- package/dist/index-CHnfHuQo.d.ts.map +0 -1
- package/dist/index-CIHK7Ew9.d.cts +0 -303
- package/dist/index-CIHK7Ew9.d.cts.map +0 -1
- package/dist/index-CIHK7Ew9.d.ts +0 -303
- package/dist/index-CIHK7Ew9.d.ts.map +0 -1
- package/dist/index-CKqC9N4o.d.ts.map +0 -1
- package/dist/index-CuzB95QT.d.cts.map +0 -1
- package/dist/index-Zaz-e8Sy.d.ts.map +0 -1
- package/dist/index-hqEnT64w.d.ts.map +0 -1
- package/dist/index-rrP1HJ2Z.d.cts.map +0 -1
- package/dist/readError-Cz3bveZa.cjs +0 -622
- package/dist/readError-Cz3bveZa.cjs.map +0 -1
- package/dist/readError-Z5zuylri.js +0 -569
- package/dist/readError-Z5zuylri.js.map +0 -1
- package/dist/readViews-BvMHbiaF.d.ts +0 -609
- package/dist/readViews-BvMHbiaF.d.ts.map +0 -1
- package/dist/readViews-CQOY5v4o.d.cts +0 -609
- package/dist/readViews-CQOY5v4o.d.cts.map +0 -1
- package/dist/sendInvocation-8TEMrJ_M.cjs +0 -661
- package/dist/sendInvocation-8TEMrJ_M.cjs.map +0 -1
- package/dist/sendInvocation-CkeMyLk1.js +0 -505
- package/dist/sendInvocation-CkeMyLk1.js.map +0 -1
- package/dist/transport-DqlfAsuH.cjs +0 -279
- package/dist/transport-DqlfAsuH.cjs.map +0 -1
- package/dist/transport-PstrCcBv.js +0 -261
- package/dist/transport-PstrCcBv.js.map +0 -1
- package/dist/validation-4w-vDGAi.cjs.map +0 -1
- package/dist/validation-eXATmgO0.js.map +0 -1
- package/dist/wallet-5wt9wLG3.js.map +0 -1
- package/dist/wallet-Blh7oas7.cjs.map +0 -1
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { SignedTransaction, Transaction } from "@thruputchain/protocol";
|
|
2
|
-
|
|
3
|
-
//#region src/provider/types.d.ts
|
|
4
|
-
/** Public identity advertised by a version 2 provider. Not an attestation. */
|
|
5
|
-
interface WalletProviderInfo {
|
|
6
|
-
/** Stable discovery ID: 1–64 ASCII letters, digits, dots, underscores, or hyphens. */
|
|
7
|
-
id: string;
|
|
8
|
-
/** Display text: 1–80 characters, without controls or surrounding whitespace. */
|
|
9
|
-
name: string;
|
|
10
|
-
/** Supported wire contract version. */
|
|
11
|
-
version: "2.0.0";
|
|
12
|
-
}
|
|
13
|
-
/** Wire pubkey account: unprefixed base58 and a decimal u64 derivation nonce. */
|
|
14
|
-
interface WalletAccount {
|
|
15
|
-
/** Derived pubkey account address: 32 bytes of case-sensitive base58. */
|
|
16
|
-
address: string;
|
|
17
|
-
/** Non-small-order, prime-order Ed25519 key in the same 32-byte base58 format. */
|
|
18
|
-
publicKey: string;
|
|
19
|
-
/** Canonical decimal u64 account-derivation nonce, not a transaction nonce. */
|
|
20
|
-
nonce: string;
|
|
21
|
-
}
|
|
22
|
-
/** Origin-authorized accounts on a network identified by a 32-byte base58 hash. */
|
|
23
|
-
interface WalletSession {
|
|
24
|
-
/** Current network identity, retained even when the origin has no permission. */
|
|
25
|
-
networkHash: string;
|
|
26
|
-
/** At most 32 unique addresses; empty for a disconnected or unauthorized origin. */
|
|
27
|
-
accounts: readonly WalletAccount[];
|
|
28
|
-
}
|
|
29
|
-
/** Non-interactive execution capabilities for one authorized account and network. */
|
|
30
|
-
interface WalletCapabilities {
|
|
31
|
-
/** Canonical account address used in the capability request. */
|
|
32
|
-
account: string;
|
|
33
|
-
/** Network identity: unprefixed, case-sensitive 32-byte base58. */
|
|
34
|
-
networkHash: string;
|
|
35
|
-
/** Ordered, all-or-nothing DefaultWallet calls; null means unsupported. */
|
|
36
|
-
atomicBatch: {
|
|
37
|
-
maxCalls: number;
|
|
38
|
-
} | null;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The complete provider request surface. Requests accept exactly the fields shown.
|
|
42
|
-
* See {@link WalletProvider.request} for each method's result and permission rules.
|
|
43
|
-
*
|
|
44
|
-
* Signing parameters select an authorized account address and the current session's
|
|
45
|
-
* network hash (unprefixed, case-sensitive base58). Transaction payloads are
|
|
46
|
-
* lowercase, even-length, 0x-prefixed canonical classic XDR, with no trailing bytes.
|
|
47
|
-
* Providers must enforce {@link MAX_UNSIGNED_TRANSACTION_BYTES} before user approval;
|
|
48
|
-
* signed payloads are bounded by {@link MAX_TRANSACTION_BYTES}.
|
|
49
|
-
*
|
|
50
|
-
* Signing never broadcasts. Submission requires the exact signed bytes previously
|
|
51
|
-
* approved for the trusted caller origin, account, and network. Providers must clear
|
|
52
|
-
* approvals on session changes or disconnect and recheck authorization before signing
|
|
53
|
-
* or broadcasting. Page-supplied parameters cannot establish the caller's origin.
|
|
54
|
-
*
|
|
55
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
56
|
-
*/
|
|
57
|
-
type ProviderRequest = {
|
|
58
|
-
method: "connect";
|
|
59
|
-
} | {
|
|
60
|
-
method: "getSession";
|
|
61
|
-
} | {
|
|
62
|
-
method: "disconnect";
|
|
63
|
-
} | {
|
|
64
|
-
method: "getCapabilities";
|
|
65
|
-
params: {
|
|
66
|
-
account: string;
|
|
67
|
-
networkHash: string;
|
|
68
|
-
};
|
|
69
|
-
} | {
|
|
70
|
-
method: "signTransaction";
|
|
71
|
-
params: {
|
|
72
|
-
account: string;
|
|
73
|
-
networkHash: string;
|
|
74
|
-
transaction: string;
|
|
75
|
-
};
|
|
76
|
-
} | {
|
|
77
|
-
method: "submitTransaction";
|
|
78
|
-
params: {
|
|
79
|
-
account: string;
|
|
80
|
-
networkHash: string;
|
|
81
|
-
signedTransaction: string;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
/** Approved signed XDR and the canonical RPC transaction/receipt hash. */
|
|
85
|
-
interface SignTransactionResult {
|
|
86
|
-
/** Canonical signed XDR preserving the approved unsigned bytes, with one signature. */
|
|
87
|
-
signedTransaction: string;
|
|
88
|
-
/** Base58 SHA-256 of unsigned transaction XDR; excludes signatures and network. */
|
|
89
|
-
hash: string;
|
|
90
|
-
}
|
|
91
|
-
/** Broadcast acknowledgement, not an execution receipt. */
|
|
92
|
-
interface SubmitTransactionResult {
|
|
93
|
-
/** The previously approved transaction hash; query its receipt on the original network. */
|
|
94
|
-
hash: string;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Framework- and transport-neutral, origin-scoped wallet interface.
|
|
98
|
-
* Validate unknown results with the matching parser before using them.
|
|
99
|
-
*
|
|
100
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
101
|
-
* @see https://docs.thruput.network/tools/wallet-integration/
|
|
102
|
-
*/
|
|
103
|
-
interface WalletProvider {
|
|
104
|
-
info: WalletProviderInfo;
|
|
105
|
-
/** Optional request extensions. Absence means legacy single-call behavior. */
|
|
106
|
-
supportedMethods?: readonly string[];
|
|
107
|
-
/**
|
|
108
|
-
* Send a request across the wallet boundary. The result is unknown until validated.
|
|
109
|
-
*
|
|
110
|
-
* | Method | Result | Permission and behavior |
|
|
111
|
-
* | --- | --- | --- |
|
|
112
|
-
* | `connect` | {@link WalletSession} | Request origin-scoped permission through wallet UI; reject on refusal. Success has at least one authorized account. |
|
|
113
|
-
* | `getSession` | {@link WalletSession} | Non-interactive snapshot; never prompt or grant access. Unauthorized origins see empty accounts and the current network hash. |
|
|
114
|
-
* | `disconnect` | `null` | Idempotently revoke this origin's permission and pending approvals. |
|
|
115
|
-
* | `getCapabilities` | {@link WalletCapabilities} | Non-interactive; requires an authorized account on the requested network. Older providers return 4200. |
|
|
116
|
-
* | `signTransaction` | {@link SignTransactionResult} | Approve and sign the exact unsigned transaction; never broadcast. |
|
|
117
|
-
* | `submitTransaction` | {@link SubmitTransactionResult} | Broadcast only exact previously approved signed bytes; acknowledgement is not an execution receipt. |
|
|
118
|
-
*
|
|
119
|
-
* Changes caused by connect/disconnect must reach page-facing listeners before the
|
|
120
|
-
* request resolves, including across bridges with separate response/event paths.
|
|
121
|
-
*/
|
|
122
|
-
request(request: ProviderRequest): Promise<unknown>;
|
|
123
|
-
/**
|
|
124
|
-
* Subscribe to full session snapshots for changes to accounts, authorization,
|
|
125
|
-
* account metadata, or network, including disconnect. Subscription itself emits
|
|
126
|
-
* no snapshot; use `getSession` to read one. See {@link request} for event ordering.
|
|
127
|
-
*
|
|
128
|
-
* @returns An idempotent unsubscribe function.
|
|
129
|
-
*/
|
|
130
|
-
on(event: "change", listener: (session: WalletSession) => void): () => void;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Stable provider error codes, including JSON-RPC-style request failures.
|
|
134
|
-
*
|
|
135
|
-
* | Code | Meaning |
|
|
136
|
-
* | --- | --- |
|
|
137
|
-
* | 4001 | User rejected the request. |
|
|
138
|
-
* | 4100 | Origin/account unauthorized, stale session, or no matching approval. |
|
|
139
|
-
* | 4200 | Unsupported method. |
|
|
140
|
-
* | 4900 | Provider disconnected or transport unavailable. |
|
|
141
|
-
* | 4901 | Requested network does not match. |
|
|
142
|
-
* | -32602 | Invalid parameters, noncanonical encoding, or exceeded input limits. |
|
|
143
|
-
* | -32603 | Internal error or invalid provider result. |
|
|
144
|
-
* | -32002 | Another operation is pending. |
|
|
145
|
-
*/
|
|
146
|
-
type WalletProviderErrorCode = 4001 | 4100 | 4200 | 4900 | 4901 | -32602 | -32603 | -32002;
|
|
147
|
-
/**
|
|
148
|
-
* A provider failure with a {@link WalletProviderErrorCode | stable numeric code}.
|
|
149
|
-
* Preserve `code` and a human-readable `message` across bridges; `instanceof` does
|
|
150
|
-
* not work across all realms. {@link parseWalletProviderError} reconstructs errors
|
|
151
|
-
* with recognized codes and messages of at most 1,024 characters.
|
|
152
|
-
*
|
|
153
|
-
* After submit starts, even failure may mean broadcast. Keep the previously saved
|
|
154
|
-
* hash and query its status on the original network instead of automatically
|
|
155
|
-
* preparing or signing a replacement transaction.
|
|
156
|
-
*/
|
|
157
|
-
declare class WalletProviderError extends Error {
|
|
158
|
-
readonly code: WalletProviderErrorCode;
|
|
159
|
-
constructor(code: WalletProviderErrorCode, message: string);
|
|
160
|
-
}
|
|
161
|
-
//#endregion
|
|
162
|
-
//#region src/provider/validation.d.ts
|
|
163
|
-
/** Maximum decoded signed XDR size: 1,048,576 bytes (1 MiB). */
|
|
164
|
-
declare const MAX_TRANSACTION_BYTES = 1048576;
|
|
165
|
-
/**
|
|
166
|
-
* Maximum unsigned XDR size: 1,048,460 bytes. Providers must enforce this before
|
|
167
|
-
* requesting user approval. Reserves 116 bytes within {@link MAX_TRANSACTION_BYTES}
|
|
168
|
-
* for the Ed25519 pubkey envelope: the signature vector count, key ID, scheme,
|
|
169
|
-
* and 64-byte signature, plus the present `pubkey_claim_key` option holding the
|
|
170
|
-
* scheme-tagged 32-byte key.
|
|
171
|
-
*/
|
|
172
|
-
declare const MAX_UNSIGNED_TRANSACTION_BYTES: number;
|
|
173
|
-
/** Maximum accounts in one session. */
|
|
174
|
-
declare const MAX_WALLET_ACCOUNTS = 32;
|
|
175
|
-
/** Current native DefaultWallet execute call limit. */
|
|
176
|
-
declare const MAX_DEFAULT_WALLET_CALLS = 16;
|
|
177
|
-
/** Validate scoped DefaultWallet capabilities. Does not establish authorization. */
|
|
178
|
-
declare function parseWalletCapabilities(value: unknown): WalletCapabilities;
|
|
179
|
-
/** Validate an unprefixed, case-sensitive base58 address, public key, or hash. */
|
|
180
|
-
declare function parseWalletIdentifier(value: unknown): string;
|
|
181
|
-
/** Validate a case-sensitive, unprefixed base58 network hash. */
|
|
182
|
-
declare function parseWalletNetworkHash(value: unknown): string;
|
|
183
|
-
/**
|
|
184
|
-
* Validate and freeze an account snapshot, including a non-small-order, prime-order
|
|
185
|
-
* Ed25519 key and its derived address. The nonce is canonical decimal u64 account
|
|
186
|
-
* derivation data, not a transaction nonce. Rejects extra fields and noncanonical
|
|
187
|
-
* values rather than normalizing them; malformed input throws code -32602.
|
|
188
|
-
*/
|
|
189
|
-
declare function parseWalletAccount(value: unknown): WalletAccount;
|
|
190
|
-
/**
|
|
191
|
-
* Strictly validate a session and return a frozen snapshot with frozen accounts.
|
|
192
|
-
* Requires a canonical network hash and at most {@link MAX_WALLET_ACCOUNTS} unique
|
|
193
|
-
* account addresses. Empty accounts are valid for an unauthorized origin; this
|
|
194
|
-
* parser does not enforce the nonempty result required by a successful `connect`.
|
|
195
|
-
*/
|
|
196
|
-
declare function parseWalletSession(value: unknown): WalletSession;
|
|
197
|
-
/** Validate bounded display metadata; never render provider names as HTML. */
|
|
198
|
-
declare function parseWalletProviderInfo(value: unknown): WalletProviderInfo;
|
|
199
|
-
/**
|
|
200
|
-
* Validate a provider's structural boundary and return the original live object.
|
|
201
|
-
* Preserves identity and method receivers; metadata is validated, not snapshotted.
|
|
202
|
-
* Unlike {@link parseWalletAccount} and {@link parseWalletSession}, this does not
|
|
203
|
-
* freeze the input. Checks versioned metadata and callable `request`/`on` members,
|
|
204
|
-
* not their behavior, permissions, returned values, or the provider's trustworthiness.
|
|
205
|
-
*/
|
|
206
|
-
declare function parseWalletProvider(value: unknown): WalletProvider;
|
|
207
|
-
/**
|
|
208
|
-
* Reconstruct a serialized provider error, without relying on `instanceof`.
|
|
209
|
-
* Requires a recognized {@link WalletProviderErrorCode} and a message of at most
|
|
210
|
-
* 1,024 characters. Invalid errors throw a new error with code -32602.
|
|
211
|
-
*/
|
|
212
|
-
declare function parseWalletProviderError(value: unknown): WalletProviderError;
|
|
213
|
-
/**
|
|
214
|
-
* Decode bounded canonical unsigned XDR, rejecting trailing or altered encodings.
|
|
215
|
-
* Accepts lowercase, even-length, 0x-prefixed hex within
|
|
216
|
-
* {@link MAX_UNSIGNED_TRANSACTION_BYTES}; providers must check this before approval.
|
|
217
|
-
* Does not establish account authorization; use {@link assertWalletTransaction}
|
|
218
|
-
* to check the transaction's account claim and enforce origin permission separately.
|
|
219
|
-
*/
|
|
220
|
-
declare function parseTransactionHex(value: unknown): Transaction;
|
|
221
|
-
/** Decode bounded canonical signed XDR; signature verification is separate. */
|
|
222
|
-
declare function parseSignedTransactionHex(value: unknown): SignedTransaction;
|
|
223
|
-
/**
|
|
224
|
-
* Parse the exact request union into a new request object, including bounded,
|
|
225
|
-
* canonical XDR. Unknown methods fail with 4200; malformed known requests fail
|
|
226
|
-
* with -32602. This validates input, not origin permission or prior approval.
|
|
227
|
-
* Bridges must bound raw messages before JSON parsing: at most 2,096,922 unsigned
|
|
228
|
-
* or 2,097,154 signed transaction-hex characters, including 0x.
|
|
229
|
-
*/
|
|
230
|
-
declare function parseProviderRequest(value: unknown): ProviderRequest;
|
|
231
|
-
/**
|
|
232
|
-
* Validate a signing response's wire structure and return a new result object.
|
|
233
|
-
* Checks canonical signed XDR and hash encoding, not signature, hash correctness,
|
|
234
|
-
* or approval. Use {@link verifySignTransactionResult} for cryptographic validation.
|
|
235
|
-
*/
|
|
236
|
-
declare function parseSignTransactionResult(value: unknown): SignTransactionResult;
|
|
237
|
-
/**
|
|
238
|
-
* Validate a submission response's hash encoding and return a new result object.
|
|
239
|
-
* Does not compare the hash to approved bytes or confirm broadcast or execution.
|
|
240
|
-
*/
|
|
241
|
-
declare function parseSubmitTransactionResult(value: unknown): SubmitTransactionResult;
|
|
242
|
-
/** Require the root address and complete pubkey claim to match a wire account. */
|
|
243
|
-
declare function assertWalletTransaction(tx: Transaction, account: WalletAccount): void;
|
|
244
|
-
/**
|
|
245
|
-
* Verify unchanged XDR, a single strict network-bound signature, and receipt hash.
|
|
246
|
-
* Requires the exact unsigned transaction bytes and matching root address/pubkey
|
|
247
|
-
* claim, and an attached `pubkey_claim_key` equal to the account's Ed25519 key.
|
|
248
|
-
* The signature must be Ed25519 with public-key ID zero, verified over
|
|
249
|
-
* `transactionSignaturePreimage(networkHash, tx)` with ZIP-215 disabled and both
|
|
250
|
-
* key and signature point R non-small-order and prime-order. The hash is SHA-256
|
|
251
|
-
* of unsigned XDR, excluding signatures and network.
|
|
252
|
-
*
|
|
253
|
-
* @param networkHash - A 32-byte base58 identifier from the authorized session.
|
|
254
|
-
* @returns A frozen verified result. This does not establish origin permission
|
|
255
|
-
* or a retained approval to submit; the provider must enforce both separately.
|
|
256
|
-
*
|
|
257
|
-
* @remarks
|
|
258
|
-
* Requires Web Crypto (HTTPS or localhost in browsers). Invalid signing results
|
|
259
|
-
* throw code -32603; invalid expected inputs fail their boundary validation first.
|
|
260
|
-
*
|
|
261
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
262
|
-
*/
|
|
263
|
-
declare function verifySignTransactionResult(value: unknown, transaction: string, account: WalletAccount, networkHash: string): Promise<SignTransactionResult>;
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/provider/discovery.d.ts
|
|
266
|
-
/** Discovery request event name. */
|
|
267
|
-
declare const REQUEST_PROVIDER_EVENT = "thruput:requestProvider";
|
|
268
|
-
/** Announcement detail is the provider itself, not an envelope. */
|
|
269
|
-
declare const ANNOUNCE_PROVIDER_EVENT = "thruput:announceProvider";
|
|
270
|
-
/** Maximum distinct provider IDs retained by one discovery subscription. */
|
|
271
|
-
declare const MAX_DISCOVERED_PROVIDERS = 32;
|
|
272
|
-
/**
|
|
273
|
-
* Validate and announce a live provider now and on each discovery request.
|
|
274
|
-
* Announcement detail is the provider itself. Defaults to `window`; pass an
|
|
275
|
-
* `EventTarget` outside a browser. Importing this module needs no browser globals.
|
|
276
|
-
*
|
|
277
|
-
* @returns Idempotent cleanup that removes the request listener. It stops future
|
|
278
|
-
* announcements from this registration, but does not retract a provider already
|
|
279
|
-
* discovered, disconnect sessions, or revoke permissions. There is no unregister event.
|
|
280
|
-
*
|
|
281
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
282
|
-
*/
|
|
283
|
-
declare function registerWalletProvider(provider: WalletProvider, target?: EventTarget): () => void;
|
|
284
|
-
/**
|
|
285
|
-
* Discover multiple providers in either load order, reporting each valid ID once.
|
|
286
|
-
* Installs the announcement listener before requesting providers. Malformed
|
|
287
|
-
* announcements are ignored; the first valid announcement for an ID wins, up to
|
|
288
|
-
* {@link MAX_DISCOVERED_PROVIDERS} IDs per subscription. IDs remain reserved until
|
|
289
|
-
* cleanup, even if a provider stops announcing. Discovery does not track removals.
|
|
290
|
-
*
|
|
291
|
-
* Defaults to `window`; pass an `EventTarget` outside a browser. IDs and names can
|
|
292
|
-
* be spoofed by page scripts: discovery validates shape, not wallet identity or trust.
|
|
293
|
-
* Render names as text, never HTML.
|
|
294
|
-
*
|
|
295
|
-
* @returns Idempotent cleanup that removes the listener and releases retained IDs.
|
|
296
|
-
* It does not disconnect discovered providers or revoke their permissions.
|
|
297
|
-
*
|
|
298
|
-
* @see https://docs.thruput.network/tools/wallet-integration/
|
|
299
|
-
*/
|
|
300
|
-
declare function discoverWalletProviders(listener: (provider: WalletProvider) => void, target?: EventTarget): () => void;
|
|
301
|
-
//#endregion
|
|
302
|
-
export { WalletProvider as A, parseWalletSession as C, SubmitTransactionResult as D, SignTransactionResult as E, WalletProviderErrorCode as M, WalletProviderInfo as N, WalletAccount as O, WalletSession as P, parseWalletProviderInfo as S, ProviderRequest as T, parseWalletCapabilities as _, registerWalletProvider as a, parseWalletProvider as b, MAX_UNSIGNED_TRANSACTION_BYTES as c, parseProviderRequest as d, parseSignTransactionResult as f, parseWalletAccount as g, parseTransactionHex as h, discoverWalletProviders as i, WalletProviderError as j, WalletCapabilities as k, MAX_WALLET_ACCOUNTS as l, parseSubmitTransactionResult as m, MAX_DISCOVERED_PROVIDERS as n, MAX_DEFAULT_WALLET_CALLS as o, parseSignedTransactionHex as p, REQUEST_PROVIDER_EVENT as r, MAX_TRANSACTION_BYTES as s, ANNOUNCE_PROVIDER_EVENT as t, assertWalletTransaction as u, parseWalletIdentifier as v, verifySignTransactionResult as w, parseWalletProviderError as x, parseWalletNetworkHash as y };
|
|
303
|
-
//# sourceMappingURL=index-CIHK7Ew9.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CIHK7Ew9.d.cts","names":[],"sources":["../src/provider/types.ts","../src/provider/validation.ts","../src/provider/discovery.ts"],"mappings":";;;;UACiB,kBAAA;;EAEf,EAAA;EAFiC;EAIjC,IAAA;EAJiC;EAMjC,OAAA;AAAA;;UAIe,aAAA;EAJR;EAMP,OAAA;EAF4B;EAI5B,SAAA;EAJ4B;EAM5B,KAAA;AAAA;;UAIe,aAAA;EAJV;EAML,WAAA;EAF4B;EAI5B,QAAA,WAAmB,aAAa;AAAA;;UAIjB,kBAAA;EAJI;EAMnB,OAAA;EANgC;EAQhC,WAAA;EAJiC;EAMjC,WAAA;IAAe,QAAA;EAAA;AAAA;;;;AAAQ;AAoBzB;;;;;;;;;;;;;KAAY,eAAA;EACN,MAAA;AAAA;EACA,MAAA;AAAA;EACA,MAAA;AAAA;EAEA,MAAA;EACA,MAAA;IAAU,OAAA;IAAiB,WAAA;EAAA;AAAA;EAG3B,MAAA;EACA,MA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D,yBAAA,CAA0B,KAAA,YAAiB,iBAAiB;ADxNnD;AAKzB;;;;AAIM;AAIN;AAbyB,iBC2OT,oBAAA,CAAqB,KAAA,YAAiB,eAAe;;;AD5N/D;AAUN;;iBCkRgB,0BAAA,CACd,KAAA,YACC,qBAAqB;;;;;iBAeR,4BAAA,CACd,KAAA,YACC,uBAAuB;;iBAOV,uBAAA,CACd,EAAA,EAAI,WAAA,EACJ,OAAA,EAAS,aAAa;;;;;;;;;;;;;ADnRwC;AAiBhE;;;;AAAmC;AAoBnC;iBC0RsB,2BAAA,CACpB,KAAA,WACA,WAAA,UACA,OAAA,EAAS,aAAA,EACT,WAAA,WACC,OAAA,CAAQ,qBAAA;;;;cC5bE,sBAAA;AFHb;AAAA,cEKa,uBAAA;;cAEA,wBAAA;;;;;AFDJ;AAIT;;;;;;iBEoBgB,sBAAA,CACd,QAAA,EAAU,cAAA,EACV,MAAA,GAAQ,WAA6B;;AFhBhC;AAIP;;;;;;;;AAIkC;AAIlC;;;;;iBEiCgB,uBAAA,CACd,QAAA,GAAW,QAAA,EAAU,cAAA,WACrB,MAAA,GAAQ,WAA6B"}
|
package/dist/index-CIHK7Ew9.d.ts
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { SignedTransaction, Transaction } from "@thruputchain/protocol";
|
|
2
|
-
|
|
3
|
-
//#region src/provider/types.d.ts
|
|
4
|
-
/** Public identity advertised by a version 2 provider. Not an attestation. */
|
|
5
|
-
interface WalletProviderInfo {
|
|
6
|
-
/** Stable discovery ID: 1–64 ASCII letters, digits, dots, underscores, or hyphens. */
|
|
7
|
-
id: string;
|
|
8
|
-
/** Display text: 1–80 characters, without controls or surrounding whitespace. */
|
|
9
|
-
name: string;
|
|
10
|
-
/** Supported wire contract version. */
|
|
11
|
-
version: "2.0.0";
|
|
12
|
-
}
|
|
13
|
-
/** Wire pubkey account: unprefixed base58 and a decimal u64 derivation nonce. */
|
|
14
|
-
interface WalletAccount {
|
|
15
|
-
/** Derived pubkey account address: 32 bytes of case-sensitive base58. */
|
|
16
|
-
address: string;
|
|
17
|
-
/** Non-small-order, prime-order Ed25519 key in the same 32-byte base58 format. */
|
|
18
|
-
publicKey: string;
|
|
19
|
-
/** Canonical decimal u64 account-derivation nonce, not a transaction nonce. */
|
|
20
|
-
nonce: string;
|
|
21
|
-
}
|
|
22
|
-
/** Origin-authorized accounts on a network identified by a 32-byte base58 hash. */
|
|
23
|
-
interface WalletSession {
|
|
24
|
-
/** Current network identity, retained even when the origin has no permission. */
|
|
25
|
-
networkHash: string;
|
|
26
|
-
/** At most 32 unique addresses; empty for a disconnected or unauthorized origin. */
|
|
27
|
-
accounts: readonly WalletAccount[];
|
|
28
|
-
}
|
|
29
|
-
/** Non-interactive execution capabilities for one authorized account and network. */
|
|
30
|
-
interface WalletCapabilities {
|
|
31
|
-
/** Canonical account address used in the capability request. */
|
|
32
|
-
account: string;
|
|
33
|
-
/** Network identity: unprefixed, case-sensitive 32-byte base58. */
|
|
34
|
-
networkHash: string;
|
|
35
|
-
/** Ordered, all-or-nothing DefaultWallet calls; null means unsupported. */
|
|
36
|
-
atomicBatch: {
|
|
37
|
-
maxCalls: number;
|
|
38
|
-
} | null;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The complete provider request surface. Requests accept exactly the fields shown.
|
|
42
|
-
* See {@link WalletProvider.request} for each method's result and permission rules.
|
|
43
|
-
*
|
|
44
|
-
* Signing parameters select an authorized account address and the current session's
|
|
45
|
-
* network hash (unprefixed, case-sensitive base58). Transaction payloads are
|
|
46
|
-
* lowercase, even-length, 0x-prefixed canonical classic XDR, with no trailing bytes.
|
|
47
|
-
* Providers must enforce {@link MAX_UNSIGNED_TRANSACTION_BYTES} before user approval;
|
|
48
|
-
* signed payloads are bounded by {@link MAX_TRANSACTION_BYTES}.
|
|
49
|
-
*
|
|
50
|
-
* Signing never broadcasts. Submission requires the exact signed bytes previously
|
|
51
|
-
* approved for the trusted caller origin, account, and network. Providers must clear
|
|
52
|
-
* approvals on session changes or disconnect and recheck authorization before signing
|
|
53
|
-
* or broadcasting. Page-supplied parameters cannot establish the caller's origin.
|
|
54
|
-
*
|
|
55
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
56
|
-
*/
|
|
57
|
-
type ProviderRequest = {
|
|
58
|
-
method: "connect";
|
|
59
|
-
} | {
|
|
60
|
-
method: "getSession";
|
|
61
|
-
} | {
|
|
62
|
-
method: "disconnect";
|
|
63
|
-
} | {
|
|
64
|
-
method: "getCapabilities";
|
|
65
|
-
params: {
|
|
66
|
-
account: string;
|
|
67
|
-
networkHash: string;
|
|
68
|
-
};
|
|
69
|
-
} | {
|
|
70
|
-
method: "signTransaction";
|
|
71
|
-
params: {
|
|
72
|
-
account: string;
|
|
73
|
-
networkHash: string;
|
|
74
|
-
transaction: string;
|
|
75
|
-
};
|
|
76
|
-
} | {
|
|
77
|
-
method: "submitTransaction";
|
|
78
|
-
params: {
|
|
79
|
-
account: string;
|
|
80
|
-
networkHash: string;
|
|
81
|
-
signedTransaction: string;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
/** Approved signed XDR and the canonical RPC transaction/receipt hash. */
|
|
85
|
-
interface SignTransactionResult {
|
|
86
|
-
/** Canonical signed XDR preserving the approved unsigned bytes, with one signature. */
|
|
87
|
-
signedTransaction: string;
|
|
88
|
-
/** Base58 SHA-256 of unsigned transaction XDR; excludes signatures and network. */
|
|
89
|
-
hash: string;
|
|
90
|
-
}
|
|
91
|
-
/** Broadcast acknowledgement, not an execution receipt. */
|
|
92
|
-
interface SubmitTransactionResult {
|
|
93
|
-
/** The previously approved transaction hash; query its receipt on the original network. */
|
|
94
|
-
hash: string;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Framework- and transport-neutral, origin-scoped wallet interface.
|
|
98
|
-
* Validate unknown results with the matching parser before using them.
|
|
99
|
-
*
|
|
100
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
101
|
-
* @see https://docs.thruput.network/tools/wallet-integration/
|
|
102
|
-
*/
|
|
103
|
-
interface WalletProvider {
|
|
104
|
-
info: WalletProviderInfo;
|
|
105
|
-
/** Optional request extensions. Absence means legacy single-call behavior. */
|
|
106
|
-
supportedMethods?: readonly string[];
|
|
107
|
-
/**
|
|
108
|
-
* Send a request across the wallet boundary. The result is unknown until validated.
|
|
109
|
-
*
|
|
110
|
-
* | Method | Result | Permission and behavior |
|
|
111
|
-
* | --- | --- | --- |
|
|
112
|
-
* | `connect` | {@link WalletSession} | Request origin-scoped permission through wallet UI; reject on refusal. Success has at least one authorized account. |
|
|
113
|
-
* | `getSession` | {@link WalletSession} | Non-interactive snapshot; never prompt or grant access. Unauthorized origins see empty accounts and the current network hash. |
|
|
114
|
-
* | `disconnect` | `null` | Idempotently revoke this origin's permission and pending approvals. |
|
|
115
|
-
* | `getCapabilities` | {@link WalletCapabilities} | Non-interactive; requires an authorized account on the requested network. Older providers return 4200. |
|
|
116
|
-
* | `signTransaction` | {@link SignTransactionResult} | Approve and sign the exact unsigned transaction; never broadcast. |
|
|
117
|
-
* | `submitTransaction` | {@link SubmitTransactionResult} | Broadcast only exact previously approved signed bytes; acknowledgement is not an execution receipt. |
|
|
118
|
-
*
|
|
119
|
-
* Changes caused by connect/disconnect must reach page-facing listeners before the
|
|
120
|
-
* request resolves, including across bridges with separate response/event paths.
|
|
121
|
-
*/
|
|
122
|
-
request(request: ProviderRequest): Promise<unknown>;
|
|
123
|
-
/**
|
|
124
|
-
* Subscribe to full session snapshots for changes to accounts, authorization,
|
|
125
|
-
* account metadata, or network, including disconnect. Subscription itself emits
|
|
126
|
-
* no snapshot; use `getSession` to read one. See {@link request} for event ordering.
|
|
127
|
-
*
|
|
128
|
-
* @returns An idempotent unsubscribe function.
|
|
129
|
-
*/
|
|
130
|
-
on(event: "change", listener: (session: WalletSession) => void): () => void;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Stable provider error codes, including JSON-RPC-style request failures.
|
|
134
|
-
*
|
|
135
|
-
* | Code | Meaning |
|
|
136
|
-
* | --- | --- |
|
|
137
|
-
* | 4001 | User rejected the request. |
|
|
138
|
-
* | 4100 | Origin/account unauthorized, stale session, or no matching approval. |
|
|
139
|
-
* | 4200 | Unsupported method. |
|
|
140
|
-
* | 4900 | Provider disconnected or transport unavailable. |
|
|
141
|
-
* | 4901 | Requested network does not match. |
|
|
142
|
-
* | -32602 | Invalid parameters, noncanonical encoding, or exceeded input limits. |
|
|
143
|
-
* | -32603 | Internal error or invalid provider result. |
|
|
144
|
-
* | -32002 | Another operation is pending. |
|
|
145
|
-
*/
|
|
146
|
-
type WalletProviderErrorCode = 4001 | 4100 | 4200 | 4900 | 4901 | -32602 | -32603 | -32002;
|
|
147
|
-
/**
|
|
148
|
-
* A provider failure with a {@link WalletProviderErrorCode | stable numeric code}.
|
|
149
|
-
* Preserve `code` and a human-readable `message` across bridges; `instanceof` does
|
|
150
|
-
* not work across all realms. {@link parseWalletProviderError} reconstructs errors
|
|
151
|
-
* with recognized codes and messages of at most 1,024 characters.
|
|
152
|
-
*
|
|
153
|
-
* After submit starts, even failure may mean broadcast. Keep the previously saved
|
|
154
|
-
* hash and query its status on the original network instead of automatically
|
|
155
|
-
* preparing or signing a replacement transaction.
|
|
156
|
-
*/
|
|
157
|
-
declare class WalletProviderError extends Error {
|
|
158
|
-
readonly code: WalletProviderErrorCode;
|
|
159
|
-
constructor(code: WalletProviderErrorCode, message: string);
|
|
160
|
-
}
|
|
161
|
-
//#endregion
|
|
162
|
-
//#region src/provider/validation.d.ts
|
|
163
|
-
/** Maximum decoded signed XDR size: 1,048,576 bytes (1 MiB). */
|
|
164
|
-
declare const MAX_TRANSACTION_BYTES = 1048576;
|
|
165
|
-
/**
|
|
166
|
-
* Maximum unsigned XDR size: 1,048,460 bytes. Providers must enforce this before
|
|
167
|
-
* requesting user approval. Reserves 116 bytes within {@link MAX_TRANSACTION_BYTES}
|
|
168
|
-
* for the Ed25519 pubkey envelope: the signature vector count, key ID, scheme,
|
|
169
|
-
* and 64-byte signature, plus the present `pubkey_claim_key` option holding the
|
|
170
|
-
* scheme-tagged 32-byte key.
|
|
171
|
-
*/
|
|
172
|
-
declare const MAX_UNSIGNED_TRANSACTION_BYTES: number;
|
|
173
|
-
/** Maximum accounts in one session. */
|
|
174
|
-
declare const MAX_WALLET_ACCOUNTS = 32;
|
|
175
|
-
/** Current native DefaultWallet execute call limit. */
|
|
176
|
-
declare const MAX_DEFAULT_WALLET_CALLS = 16;
|
|
177
|
-
/** Validate scoped DefaultWallet capabilities. Does not establish authorization. */
|
|
178
|
-
declare function parseWalletCapabilities(value: unknown): WalletCapabilities;
|
|
179
|
-
/** Validate an unprefixed, case-sensitive base58 address, public key, or hash. */
|
|
180
|
-
declare function parseWalletIdentifier(value: unknown): string;
|
|
181
|
-
/** Validate a case-sensitive, unprefixed base58 network hash. */
|
|
182
|
-
declare function parseWalletNetworkHash(value: unknown): string;
|
|
183
|
-
/**
|
|
184
|
-
* Validate and freeze an account snapshot, including a non-small-order, prime-order
|
|
185
|
-
* Ed25519 key and its derived address. The nonce is canonical decimal u64 account
|
|
186
|
-
* derivation data, not a transaction nonce. Rejects extra fields and noncanonical
|
|
187
|
-
* values rather than normalizing them; malformed input throws code -32602.
|
|
188
|
-
*/
|
|
189
|
-
declare function parseWalletAccount(value: unknown): WalletAccount;
|
|
190
|
-
/**
|
|
191
|
-
* Strictly validate a session and return a frozen snapshot with frozen accounts.
|
|
192
|
-
* Requires a canonical network hash and at most {@link MAX_WALLET_ACCOUNTS} unique
|
|
193
|
-
* account addresses. Empty accounts are valid for an unauthorized origin; this
|
|
194
|
-
* parser does not enforce the nonempty result required by a successful `connect`.
|
|
195
|
-
*/
|
|
196
|
-
declare function parseWalletSession(value: unknown): WalletSession;
|
|
197
|
-
/** Validate bounded display metadata; never render provider names as HTML. */
|
|
198
|
-
declare function parseWalletProviderInfo(value: unknown): WalletProviderInfo;
|
|
199
|
-
/**
|
|
200
|
-
* Validate a provider's structural boundary and return the original live object.
|
|
201
|
-
* Preserves identity and method receivers; metadata is validated, not snapshotted.
|
|
202
|
-
* Unlike {@link parseWalletAccount} and {@link parseWalletSession}, this does not
|
|
203
|
-
* freeze the input. Checks versioned metadata and callable `request`/`on` members,
|
|
204
|
-
* not their behavior, permissions, returned values, or the provider's trustworthiness.
|
|
205
|
-
*/
|
|
206
|
-
declare function parseWalletProvider(value: unknown): WalletProvider;
|
|
207
|
-
/**
|
|
208
|
-
* Reconstruct a serialized provider error, without relying on `instanceof`.
|
|
209
|
-
* Requires a recognized {@link WalletProviderErrorCode} and a message of at most
|
|
210
|
-
* 1,024 characters. Invalid errors throw a new error with code -32602.
|
|
211
|
-
*/
|
|
212
|
-
declare function parseWalletProviderError(value: unknown): WalletProviderError;
|
|
213
|
-
/**
|
|
214
|
-
* Decode bounded canonical unsigned XDR, rejecting trailing or altered encodings.
|
|
215
|
-
* Accepts lowercase, even-length, 0x-prefixed hex within
|
|
216
|
-
* {@link MAX_UNSIGNED_TRANSACTION_BYTES}; providers must check this before approval.
|
|
217
|
-
* Does not establish account authorization; use {@link assertWalletTransaction}
|
|
218
|
-
* to check the transaction's account claim and enforce origin permission separately.
|
|
219
|
-
*/
|
|
220
|
-
declare function parseTransactionHex(value: unknown): Transaction;
|
|
221
|
-
/** Decode bounded canonical signed XDR; signature verification is separate. */
|
|
222
|
-
declare function parseSignedTransactionHex(value: unknown): SignedTransaction;
|
|
223
|
-
/**
|
|
224
|
-
* Parse the exact request union into a new request object, including bounded,
|
|
225
|
-
* canonical XDR. Unknown methods fail with 4200; malformed known requests fail
|
|
226
|
-
* with -32602. This validates input, not origin permission or prior approval.
|
|
227
|
-
* Bridges must bound raw messages before JSON parsing: at most 2,096,922 unsigned
|
|
228
|
-
* or 2,097,154 signed transaction-hex characters, including 0x.
|
|
229
|
-
*/
|
|
230
|
-
declare function parseProviderRequest(value: unknown): ProviderRequest;
|
|
231
|
-
/**
|
|
232
|
-
* Validate a signing response's wire structure and return a new result object.
|
|
233
|
-
* Checks canonical signed XDR and hash encoding, not signature, hash correctness,
|
|
234
|
-
* or approval. Use {@link verifySignTransactionResult} for cryptographic validation.
|
|
235
|
-
*/
|
|
236
|
-
declare function parseSignTransactionResult(value: unknown): SignTransactionResult;
|
|
237
|
-
/**
|
|
238
|
-
* Validate a submission response's hash encoding and return a new result object.
|
|
239
|
-
* Does not compare the hash to approved bytes or confirm broadcast or execution.
|
|
240
|
-
*/
|
|
241
|
-
declare function parseSubmitTransactionResult(value: unknown): SubmitTransactionResult;
|
|
242
|
-
/** Require the root address and complete pubkey claim to match a wire account. */
|
|
243
|
-
declare function assertWalletTransaction(tx: Transaction, account: WalletAccount): void;
|
|
244
|
-
/**
|
|
245
|
-
* Verify unchanged XDR, a single strict network-bound signature, and receipt hash.
|
|
246
|
-
* Requires the exact unsigned transaction bytes and matching root address/pubkey
|
|
247
|
-
* claim, and an attached `pubkey_claim_key` equal to the account's Ed25519 key.
|
|
248
|
-
* The signature must be Ed25519 with public-key ID zero, verified over
|
|
249
|
-
* `transactionSignaturePreimage(networkHash, tx)` with ZIP-215 disabled and both
|
|
250
|
-
* key and signature point R non-small-order and prime-order. The hash is SHA-256
|
|
251
|
-
* of unsigned XDR, excluding signatures and network.
|
|
252
|
-
*
|
|
253
|
-
* @param networkHash - A 32-byte base58 identifier from the authorized session.
|
|
254
|
-
* @returns A frozen verified result. This does not establish origin permission
|
|
255
|
-
* or a retained approval to submit; the provider must enforce both separately.
|
|
256
|
-
*
|
|
257
|
-
* @remarks
|
|
258
|
-
* Requires Web Crypto (HTTPS or localhost in browsers). Invalid signing results
|
|
259
|
-
* throw code -32603; invalid expected inputs fail their boundary validation first.
|
|
260
|
-
*
|
|
261
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
262
|
-
*/
|
|
263
|
-
declare function verifySignTransactionResult(value: unknown, transaction: string, account: WalletAccount, networkHash: string): Promise<SignTransactionResult>;
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/provider/discovery.d.ts
|
|
266
|
-
/** Discovery request event name. */
|
|
267
|
-
declare const REQUEST_PROVIDER_EVENT = "thruput:requestProvider";
|
|
268
|
-
/** Announcement detail is the provider itself, not an envelope. */
|
|
269
|
-
declare const ANNOUNCE_PROVIDER_EVENT = "thruput:announceProvider";
|
|
270
|
-
/** Maximum distinct provider IDs retained by one discovery subscription. */
|
|
271
|
-
declare const MAX_DISCOVERED_PROVIDERS = 32;
|
|
272
|
-
/**
|
|
273
|
-
* Validate and announce a live provider now and on each discovery request.
|
|
274
|
-
* Announcement detail is the provider itself. Defaults to `window`; pass an
|
|
275
|
-
* `EventTarget` outside a browser. Importing this module needs no browser globals.
|
|
276
|
-
*
|
|
277
|
-
* @returns Idempotent cleanup that removes the request listener. It stops future
|
|
278
|
-
* announcements from this registration, but does not retract a provider already
|
|
279
|
-
* discovered, disconnect sessions, or revoke permissions. There is no unregister event.
|
|
280
|
-
*
|
|
281
|
-
* @see https://docs.thruput.network/tools/wallet-provider/
|
|
282
|
-
*/
|
|
283
|
-
declare function registerWalletProvider(provider: WalletProvider, target?: EventTarget): () => void;
|
|
284
|
-
/**
|
|
285
|
-
* Discover multiple providers in either load order, reporting each valid ID once.
|
|
286
|
-
* Installs the announcement listener before requesting providers. Malformed
|
|
287
|
-
* announcements are ignored; the first valid announcement for an ID wins, up to
|
|
288
|
-
* {@link MAX_DISCOVERED_PROVIDERS} IDs per subscription. IDs remain reserved until
|
|
289
|
-
* cleanup, even if a provider stops announcing. Discovery does not track removals.
|
|
290
|
-
*
|
|
291
|
-
* Defaults to `window`; pass an `EventTarget` outside a browser. IDs and names can
|
|
292
|
-
* be spoofed by page scripts: discovery validates shape, not wallet identity or trust.
|
|
293
|
-
* Render names as text, never HTML.
|
|
294
|
-
*
|
|
295
|
-
* @returns Idempotent cleanup that removes the listener and releases retained IDs.
|
|
296
|
-
* It does not disconnect discovered providers or revoke their permissions.
|
|
297
|
-
*
|
|
298
|
-
* @see https://docs.thruput.network/tools/wallet-integration/
|
|
299
|
-
*/
|
|
300
|
-
declare function discoverWalletProviders(listener: (provider: WalletProvider) => void, target?: EventTarget): () => void;
|
|
301
|
-
//#endregion
|
|
302
|
-
export { WalletProvider as A, parseWalletSession as C, SubmitTransactionResult as D, SignTransactionResult as E, WalletProviderErrorCode as M, WalletProviderInfo as N, WalletAccount as O, WalletSession as P, parseWalletProviderInfo as S, ProviderRequest as T, parseWalletCapabilities as _, registerWalletProvider as a, parseWalletProvider as b, MAX_UNSIGNED_TRANSACTION_BYTES as c, parseProviderRequest as d, parseSignTransactionResult as f, parseWalletAccount as g, parseTransactionHex as h, discoverWalletProviders as i, WalletProviderError as j, WalletCapabilities as k, MAX_WALLET_ACCOUNTS as l, parseSubmitTransactionResult as m, MAX_DISCOVERED_PROVIDERS as n, MAX_DEFAULT_WALLET_CALLS as o, parseSignedTransactionHex as p, REQUEST_PROVIDER_EVENT as r, MAX_TRANSACTION_BYTES as s, ANNOUNCE_PROVIDER_EVENT as t, assertWalletTransaction as u, parseWalletIdentifier as v, verifySignTransactionResult as w, parseWalletProviderError as x, parseWalletNetworkHash as y };
|
|
303
|
-
//# sourceMappingURL=index-CIHK7Ew9.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CIHK7Ew9.d.ts","names":[],"sources":["../src/provider/types.ts","../src/provider/validation.ts","../src/provider/discovery.ts"],"mappings":";;;;UACiB,kBAAA;;EAEf,EAAA;EAFiC;EAIjC,IAAA;EAJiC;EAMjC,OAAA;AAAA;;UAIe,aAAA;EAJR;EAMP,OAAA;EAF4B;EAI5B,SAAA;EAJ4B;EAM5B,KAAA;AAAA;;UAIe,aAAA;EAJV;EAML,WAAA;EAF4B;EAI5B,QAAA,WAAmB,aAAa;AAAA;;UAIjB,kBAAA;EAJI;EAMnB,OAAA;EANgC;EAQhC,WAAA;EAJiC;EAMjC,WAAA;IAAe,QAAA;EAAA;AAAA;;;;AAAQ;AAoBzB;;;;;;;;;;;;;KAAY,eAAA;EAC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,QAAA;EAAA,SACT,QAAA,IACP,UAAA,EAAY,kBAAA,YACF,OAAA;EAAA,SACH,iBAAA;AAAA,IACP,oBAAA,CAAqB,OAAA,IACxB,sBAAA,CAAuB,OAAA,EAAS,QAAA;AAAA,iBACnB,kBAAA,iBACE,iBAAA,mBACC,oBAAA,EAEjB,OAAA;EAAA,SACW,MAAA,EAAQ,OAAA;EAAA,SACR,OAAA,EAAS,QAAA;EAAA,SACT,QAAA,IACP,UAAA,EAAY,kBAAA,YACF,OAAA;EAAA,SACH,iBAAA;AAAA,IACP,oBAAA,CAAqB,OAAA,IACxB,YAAA,CAAa,OAAA,EAAS,QAAA;AAAA,iBACT,kBAAA,iBACE,iBAAA,mBACC,aAAA,EAEjB,OAAA;EAAA,SACW,MAAA,EAAQ,OAAA;EAAA,SACR,OAAA,EAAS,QAAA;EAAA,SACT,QAAA,IACP,UAAA,EAAY,kBAAA,YACF,OAAA;EAAA,SACH,iBAAA;AAAA,IACP,oBAAA,CAAqB,OAAA,IACxB,YAAA,CAAa,OAAA,EAAS,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CuzB95QT.d.cts","names":[],"sources":["../src/actions/public/getContractSpec.ts","../src/actions/public/getEffectiveContractSpec.ts","../src/actions/public/decodeWalletRequests.ts","../src/actions/public/readTransactionInput.ts","../src/actions/wallet/sendTransaction.ts","../src/actions/wallet/sendInvocation.ts"],"mappings":";;;;;;;;UAoBiB,kBAAA,SAA2B,2BAA2B;EACrE,YAAA,EAAc,oBAAA;AAAA;;;;;;iBAQM,eAAA,CACpB,MAAA,EAAQ,SAAA,EACR,OAAA;EAAW,OAAA,EAAS,UAAA;AAAA,GACpB,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,kBAAA;;;UCXM,2BAAA,SAAoC,0BAAA;EACnD,YAAA,EAAc,oBAAA;EDHC;ECKf,eAAA;IAAmB,IAAA;IAAuB,IAAA,EAAM,YAAA;EAAA;AAAA;;;ADJd;AAQpC;;iBCIsB,wBAAA,CACpB,MAAA,EAAQ,SAAA,EACR,OAAA;EAAW,OAAA,EAAS,UAAA;EAAY,OAAA;AAAA,GAChC,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,2BAAA;;;;UCzBM,cAAA;EACf,OAAA;EACA,cAAA,EAAgB,UAAU;AAAA;;AFM5B;;;;iBEEgB,2BAAA,CACd,IAAA,EAAM,UAAA,GACL,cAAc;;;;KCVL,wBAAA;EAEN,MAAA;EACA,eAAA,EAAiB,UAAA;EACjB,WAAA;EACA,cAAA,EAAgB,UAAA;EAChB,WAAA,EAAa,WAAA;AAAA;EAEb,MAAA;AAAA,IACF,mBAAA;;AHFgC;AAQpC;;;iBGCsB,oBAAA,CACpB,MAAA,EAAQ,SAAA,EACR,OAAA;EAAW,eAAA,EAAiB,UAAA;AAAA,GAC5B,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,wBAAA;;;;;;;AHdX;;iBICsB,eAAA,CACpB,MAAA,EAAQ,IAAA,CAAK,SAAA,oCACb,QAAA,EAAU,iBAAA,EACV,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,UAAA;;;AJLX;AAAA,iBKasB,cAAA,CACpB,MAAA,EAAQ,IAAA,CACN,iBAAA,uEAGF,OAAA,EAAS,aAAA,EACT,WAAA,EAAa,WAAA,EACb,OAAA,EAAS,yBAAA,EACT,QAAA;EACE,MAAA,GAAS,WAAA;EACT,QAAA,IAAY,QAAA,EAAU,kBAAA,YAA8B,OAAA;AAAA,IAErD,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-Zaz-e8Sy.d.ts","names":[],"sources":["../src/transport/http.ts","../src/transport/mock.ts","../src/transport/readError.ts","../src/transport/txInvalidDetail.ts","../src/rpc/errors.ts","../src/rpc/errorReader.ts","../src/transport/responseError.ts"],"mappings":";;;;;AASA;;;cAAa,YAAA,SAAqB,KAAK;EAAL;EAEhC,IAAA;EAGA;EAA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A;EAAA;;;;;;;;;;;;;;;KCID,eAAA;EACN,cAAA;EAAyB,IAAA,EAAM,YAAY;EAAE,GAAA;AAAA;EAC7C,cAAA;EAAgC,GAAA;AAAA;;cAqGzB,cAAA,SAAuB,YAAA;EAAA,SACzB,OAAA,EAAS,eAAA;cAEhB,KAAA,EAAO,YAAA,EACP,MAAA,UACA,uBAAA,GAA0B,UAAA;AAAA;;;;cCjHjB,gBAAA,SAAyB,KAAK;EAAA,SAG9B,GAAA;cADT,OAAA,UACS,GAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-hqEnT64w.d.ts","names":[],"sources":["../src/contract/encode.ts","../src/contract/specMethod.ts","../src/contract/codegen.ts","../src/contract/hash.ts","../src/derivation/contractAddress.ts","../src/contract/errors.ts","../src/contract/signedToken.ts","../src/contract/instance.ts"],"mappings":";;;;;;AAuKA;;;;;iBAAgB,YAAA,CACd,EAAA,EAAI,cAAA,EACJ,WAAA,GAAc,MAAA,SAAe,QAAA,aAC5B,QAAA;;;;;;;;;;;AAAQ;AAoKX;;;;;;;iBAAgB,cAAA,CACd,IAAA,EAAM,YAAA,EACN,aAAA,UACA,UAAA,UACA,IAAA,aACA,WAAA,EAAa,MAAA,SAAe,QAAA,aAC3B,QAAA;;;;;;;iBAwBa,cAAA,CACd,IAAA,EAAM,YAAA,EACN,aAAA,UACA,UAAA,UACA,IAAA,EAAM,UAAA,EACN,WAAA,EAAa,MAAA,SAAe,QAAA,aAC3B,MAAA;;;;UCtWc,qBAAA;EACf,IAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;AAAA;;UAIe,eAAA;EACf,aAAA;EACA,gBAAA;EACA,UAAA;EACA,IAAA,EAAM,MAAA;EACN,MAAA,EAAQ,cAAA,CACN,MAAA,mCAEA,qBAAA;AAAA;;;;;AD8IO;iBCrIK,yBAAA,CACd,IAAA,EAAM,YAAA,IAEN,UAAA,EAAY,IAAA,CAAK,UAAA,iCACd,eAAA;;;;;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