@thruputchain/client 0.29.0 → 0.30.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 +2 -2
- package/dist/{actions-UEYKD22C.js → actions-B7htk5FS.js} +59 -14
- package/dist/{actions-UEYKD22C.js.map → actions-B7htk5FS.js.map} +1 -1
- package/dist/{actions-B2gV8Vzr.cjs → actions-CIaI049y.cjs} +64 -13
- package/dist/actions-CIaI049y.cjs.map +1 -0
- package/dist/actions.cjs +2 -1
- package/dist/actions.d.cts +2 -2
- package/dist/actions.d.ts +2 -2
- package/dist/actions.js +2 -2
- package/dist/contract.d.cts +1 -2
- package/dist/contract.d.ts +1 -2
- package/dist/contracts.d.cts +5 -88
- package/dist/contracts.d.cts.map +1 -1
- package/dist/contracts.d.ts +5 -88
- package/dist/contracts.d.ts.map +1 -1
- package/dist/default_wallet-DkqsCa5C.d.ts +90 -0
- package/dist/default_wallet-DkqsCa5C.d.ts.map +1 -0
- package/dist/default_wallet-Dqs4_iTD.d.cts +90 -0
- package/dist/default_wallet-Dqs4_iTD.d.cts.map +1 -0
- package/dist/{index-Btl_jMCT.d.ts → index-BmOG68Hd.d.ts} +39 -7
- package/dist/index-BmOG68Hd.d.ts.map +1 -0
- package/dist/{index-BZ5j5P5d.d.ts → index-Dtv_GV6M.d.ts} +32 -5
- package/dist/index-Dtv_GV6M.d.ts.map +1 -0
- package/dist/{index-BhOeIyrZ.d.cts → index-JKm4TBlY.d.cts} +32 -5
- package/dist/index-JKm4TBlY.d.cts.map +1 -0
- package/dist/{index-BfYEEVHm.d.cts → index-ozfbEuYI.d.cts} +39 -7
- package/dist/index-ozfbEuYI.d.cts.map +1 -0
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +4 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/signed-op.d.cts +1 -1
- package/dist/signed-op.d.ts +1 -1
- package/dist/{signed_op-DoHFpSH4.d.cts → signed_op-DHb4n2JO.d.cts} +2 -2
- package/dist/{signed_op-DoHFpSH4.d.cts.map → signed_op-DHb4n2JO.d.cts.map} +1 -1
- package/dist/{signed_op-BvbOHWKK.d.ts → signed_op-Dfa8WD0j.d.ts} +2 -2
- package/dist/{signed_op-BvbOHWKK.d.ts.map → signed_op-Dfa8WD0j.d.ts.map} +1 -1
- package/package.json +4 -4
- package/dist/actions-B2gV8Vzr.cjs.map +0 -1
- package/dist/artifact-RIAPVmVX.d.cts +0 -36
- package/dist/artifact-RIAPVmVX.d.cts.map +0 -1
- package/dist/artifact-RIAPVmVX.d.ts +0 -36
- package/dist/artifact-RIAPVmVX.d.ts.map +0 -1
- package/dist/index-BZ5j5P5d.d.ts.map +0 -1
- package/dist/index-BfYEEVHm.d.cts.map +0 -1
- package/dist/index-BhOeIyrZ.d.cts.map +0 -1
- package/dist/index-Btl_jMCT.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions-CIaI049y.cjs","names":["ThruputError","UnsupportedRpcValue","beforeDeadline","rpcIncompatible","isThruputError","classifyReadError","waitDelay","beforeDeadline","rpcIncompatible","isUnsupportedRpcValue","isCancellation","isThruputError","classifyReadError","receiptFacts","ThruputError","createSubmissionEvidence","contractDecodeFailed","ThruputError","toHex0x","contractDecodeFailed","bytesEqual","contractVerificationFailed","readContractArtifactSpec","codec","ContractType","hashContract","ContractType","HogexecPrecompiledNativeContracts","bytesEqual","contractVerificationFailed","UnsupportedRpcValue","ThruputError","defaultWalletSpec","codec","bytesEqual","DefaultWallet","deriveContractAddress","UnsupportedRpcValue","bytesEqual","codec","contractVerificationFailed","errorText","createSubmissionEvidence","codec","transactionNotSubmitted","isCancellation","transactionOutcomeUnknown","isLocalRequestError","reasonAfterDispatch","isThruputError","withTransactionFacts"],"sources":["../src/actions/public/waitForTransactionReceipt.ts","../src/actions/public/requestAirdrop.ts","../src/actions/public/getContractEvents.ts","../src/actions/public/historyWalk.ts","../src/actions/public/iterateEventPages.ts","../src/actions/public/readViews.ts","../src/actions/public/iterateTransactionPages.ts","../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"],"sourcesContent":["import { toBase58 } from \"../../encoding.js\";\nimport { isThruputError, ThruputError } from \"../../errors/thruputError.js\";\nimport type { TransactionReason } from \"../../errors/transaction.js\";\nimport type { RpcClient } from \"../../rpc/client.js\";\nimport { rpcIncompatible } from \"../../rpc/client.js\";\nimport { UnsupportedRpcValue } from \"../../rpc/codec.js\";\nimport type { TransactionReceipt, TransactionStatus } from \"../../types/rpc.js\";\nimport { classifyReadError } from \"../../transport/readError.js\";\nimport { beforeDeadline, validateTimer, waitDelay } from \"../deadline.js\";\n\nexport interface KnownCommitment {\n readonly networkHash: Uint8Array;\n readonly transactionHash: Uint8Array;\n readonly blockHeight: bigint;\n}\nexport interface WaitForTransactionReceiptOptions {\n signal?: AbortSignal;\n /** Verified before each observation; omission uses discovery's validated network. */\n expectedNetworkHash?: Uint8Array;\n knownCommitment?: KnownCommitment;\n /** Observed status, including optional advisory attempt diagnostics. Never retry permission. */\n onStatus?: (status: TransactionStatus) => void;\n timeoutMs?: number;\n pollingIntervalMs?: number;\n}\n/**\n * Observation stopped: code `transactionOutcomeUnknown`. Neither a timeout nor\n * cancellation proves that the transaction did not execute.\n */\nfunction outcomeUnknown(\n transactionHash: Uint8Array,\n reason: TransactionReason,\n timedOut: boolean,\n cause: unknown,\n knownCommitment: KnownCommitment | undefined,\n lastStatus: TransactionStatus | undefined,\n): ThruputError<\"transactionOutcomeUnknown\"> {\n return new ThruputError(\n \"transactionOutcomeUnknown\",\n timedOut\n ? `Timed out waiting for transaction ${toBase58(transactionHash)}`\n : `Could not observe transaction ${toBase58(transactionHash)}`,\n {\n context: {\n ...(knownCommitment ? { knownCommitment } : {}),\n ...(lastStatus ? { lastStatus } : {}),\n },\n ...(cause === undefined ? {} : { cause }),\n transaction: { hash: transactionHash, outcome: \"unknown\", reason },\n },\n );\n}\n\n/** The observation deadline. Private, so read-error handling never retries it. */\nclass ObservationTimeout extends Error {}\n\n/** The reason for a timeout: the last read failure or node status, when known. */\nfunction timeoutReason(\n lastFailure: unknown,\n lastStatus: TransactionStatus | undefined,\n): TransactionReason {\n if (lastFailure !== undefined) return \"disconnected\";\n if (lastStatus === undefined) return \"timeout\";\n if (lastStatus instanceof UnsupportedRpcValue) return \"statusUnknown\";\n if (lastStatus.status === \"unknown\" || lastStatus.status === \"other\")\n return \"statusUnknown\";\n if (lastStatus.status === \"recentFailure\") return \"recentFailure\";\n return \"timeout\";\n}\n\nconst equal = (a: Uint8Array, b: Uint8Array) =>\n a.length === b.length && a.every((v, i) => v === b[i]);\n/** Read-only capabilities used by commitment and receipt observation. */\nexport type ReceiptObserver = Pick<\n RpcClient,\n | \"getNetworkInfo\"\n | \"getTransactionReceipt\"\n | \"getTransactionStatus\"\n | \"discovery\"\n | \"requireMethods\"\n>;\n\n/**\n * Return any committed receipt, including failed execution. Never sign or resubmit.\n * When observation stops, throws code `transactionOutcomeUnknown` with\n * `transaction.reason` set to why it stopped.\n */\nexport async function waitForTransactionReceipt(\n client: ReceiptObserver,\n transactionHash: Uint8Array,\n options: WaitForTransactionReceiptOptions = {},\n): Promise<TransactionReceipt> {\n return (await observe(\n client,\n transactionHash,\n options,\n false,\n )) as TransactionReceipt;\n}\n/** Observe commitment independently of receipt availability or execution success. */\nexport async function waitForCommitment(\n client: ReceiptObserver,\n transactionHash: Uint8Array,\n options: WaitForTransactionReceiptOptions = {},\n): Promise<KnownCommitment> {\n return (await observe(\n client,\n transactionHash,\n options,\n true,\n )) as KnownCommitment;\n}\n// Status evidence includes extensible values at arbitrary nested schema positions.\n// structuredClone alone drops their UnsupportedRpcValue class identity.\nfunction snapshotStatus(status: TransactionStatus): TransactionStatus {\n const copy = (value: unknown): unknown => {\n if (value instanceof UnsupportedRpcValue)\n return new UnsupportedRpcValue(structuredClone(value.raw));\n if (Array.isArray(value)) return value.map(copy);\n if (ArrayBuffer.isView(value)) return structuredClone(value);\n if (value !== null && typeof value === \"object\")\n return Object.fromEntries(\n Object.entries(value).map(([key, entry]) => [key, copy(entry)]),\n );\n return value;\n };\n return copy(status) as TransactionStatus;\n}\n\nasync function observe(\n client: ReceiptObserver,\n hash: Uint8Array,\n options: WaitForTransactionReceiptOptions,\n commitmentOnly: boolean,\n): Promise<TransactionReceipt | KnownCommitment> {\n const timeoutMs = options.timeoutMs ?? 30000;\n const interval = options.pollingIntervalMs ?? 250;\n validateTimer(timeoutMs, \"timeoutMs\");\n validateTimer(interval, \"pollingIntervalMs\");\n const transactionHash = new Uint8Array(hash);\n const networkHash = new Uint8Array(\n options.expectedNetworkHash ?? client.discovery.network.networkHash,\n );\n if (transactionHash.length !== 32 || networkHash.length !== 32)\n throw new RangeError(\n \"Transaction and network hashes must contain 32 bytes\",\n );\n let commitment: KnownCommitment | undefined;\n let lastStatus: TransactionStatus | undefined;\n if (options.knownCommitment) {\n const known = options.knownCommitment;\n if (\n !equal(known.transactionHash, transactionHash) ||\n !equal(known.networkHash, networkHash) ||\n typeof known.blockHeight !== \"bigint\" ||\n known.blockHeight < 0n ||\n known.blockHeight > 9223372036854775807n\n )\n // A caller argument, so a native error, like other invalid arguments.\n throw new TypeError(\n \"knownCommitment does not match the transaction hash and network\",\n );\n commitment = {\n transactionHash: transactionHash.slice(),\n networkHash: networkHash.slice(),\n blockHeight: known.blockHeight,\n };\n lastStatus = { status: \"committed\", blockHeight: known.blockHeight };\n }\n client.requireMethods([\n \"getNetworkInfo\",\n \"getTransactionReceipt\",\n \"getTransactionStatus\",\n ]);\n const deadline = performance.now() + timeoutMs;\n let lastFailure: unknown;\n let failures = 0;\n let timedOut = false;\n // Set where the reason is known at the throw site; other failures are classified below.\n let stopReason: TransactionReason | undefined;\n const stop = (reason: TransactionReason, error: unknown) => {\n stopReason = reason;\n return error;\n };\n const timeout = () => {\n timedOut = true;\n return new ObservationTimeout(\"Transaction observation timed out\");\n };\n const run = <T>(operation: (signal: AbortSignal) => Promise<T>) =>\n beforeDeadline(operation, deadline, options.signal, timeout);\n const retain = (blockHeight: bigint) => {\n if (commitment && commitment.blockHeight !== blockHeight)\n throw stop(\n \"commitmentConflict\",\n rpcIncompatible(\n \"commitment\",\n \"Conflicting commitment heights for the same transaction\",\n ),\n );\n commitment = {\n transactionHash: transactionHash.slice(),\n networkHash: networkHash.slice(),\n blockHeight,\n };\n lastStatus = { status: \"committed\", blockHeight };\n };\n try {\n while (true) {\n let retryAfterMs: bigint | undefined;\n let networkVerified = false;\n let failed = false;\n try {\n const network = await run((signal) =>\n client.getNetworkInfo({}, { signal }),\n );\n if (!equal(network.networkHash, networkHash))\n throw stop(\n \"networkChanged\",\n rpcIncompatible(\"network\", \"Observation endpoint network changed\"),\n );\n networkVerified = true;\n if (commitmentOnly && commitment) return structuredClone(commitment);\n const receipt = await run((signal) =>\n client.getTransactionReceipt({ transactionHash }, { signal }),\n );\n if (receipt) {\n retain(receipt.blockHeight);\n return commitmentOnly ? structuredClone(commitment!) : receipt;\n }\n } catch (cause) {\n // An abort reason can be another transaction's error; read nothing from it.\n if (cause instanceof ObservationTimeout || options.signal?.aborted)\n throw cause;\n lastFailure = cause;\n failed = true;\n if (isThruputError(cause, \"nativeRpcError\") && cause.context.data) {\n const data = cause.context.data;\n if (data.kind === \"backendDataInvalid\" && data.observation) {\n retain(data.observation.blockHeight);\n if (commitmentOnly) return structuredClone(commitment!);\n }\n if (\"retryAfterMs\" in data) retryAfterMs = data.retryAfterMs;\n }\n if (\n options.signal?.aborted ||\n classifyReadError(cause, options) !== \"transient\"\n )\n throw cause;\n }\n // Status failures cannot erase a previously validated commitment.\n let observedStatus: TransactionStatus | undefined;\n if (networkVerified)\n try {\n const status = await run((signal) =>\n client.getTransactionStatus({ transactionHash }, { signal }),\n );\n if (\n !(status instanceof UnsupportedRpcValue) &&\n status.status === \"committed\"\n )\n retain(status.blockHeight);\n else if (!commitment) lastStatus = snapshotStatus(status);\n observedStatus = status;\n } catch (cause) {\n if (\n cause instanceof ObservationTimeout ||\n isThruputError(cause, \"rpcIncompatible\") ||\n isThruputError(cause, \"rpcValueInvalid\") ||\n isThruputError(cause, \"rpcRequestInvalid\") ||\n classifyReadError(cause, options) === \"permanent\"\n )\n throw cause;\n options.signal?.throwIfAborted();\n lastFailure = cause;\n failed = true;\n if (\n isThruputError(cause, \"nativeRpcError\") &&\n cause.context.data &&\n \"retryAfterMs\" in cause.context.data\n ) {\n const hint = cause.context.data.retryAfterMs;\n if (\n hint !== undefined &&\n (retryAfterMs === undefined || hint > retryAfterMs)\n )\n retryAfterMs = hint;\n }\n }\n if (observedStatus !== undefined) options.onStatus?.(observedStatus);\n if (failed) failures++;\n else {\n failures = 0;\n lastFailure = undefined;\n }\n if (commitmentOnly && commitment) return structuredClone(commitment);\n const backoff = failures\n ? Math.min(\n 5000,\n Math.max(1, interval) * 2 ** Math.min(failures - 1, 8),\n ) *\n (0.5 + Math.random() / 2)\n : interval;\n const remaining = deadline - performance.now();\n if (\n retryAfterMs !== undefined &&\n retryAfterMs > BigInt(Math.max(0, Math.floor(remaining)))\n )\n throw timeout();\n const delay = Math.max(backoff, Number(retryAfterMs ?? 0n));\n await run((signal) =>\n waitDelay(Math.min(delay, Math.max(0, remaining)), signal),\n );\n }\n } catch (cause) {\n const reason: TransactionReason = options.signal?.aborted\n ? \"cancelled\"\n : timedOut\n ? timeoutReason(lastFailure, lastStatus)\n : (stopReason ?? \"observationFailed\");\n throw outcomeUnknown(\n transactionHash,\n reason,\n timedOut && reason !== \"cancelled\",\n cause instanceof ObservationTimeout ? lastFailure : cause,\n commitment && structuredClone(commitment),\n lastStatus,\n );\n }\n}\n","import type { RpcClient } from \"../../rpc/client.js\";\nimport { rpcIncompatible } from \"../../rpc/client.js\";\nimport {\n isUnsupportedRpcValue,\n type UnsupportedRpcValue,\n} from \"../../rpc/codec.js\";\nimport { isThruputError, ThruputError } from \"../../errors/thruputError.js\";\nimport type {\n TransactionFactsInput,\n TransactionReason,\n} from \"../../errors/transaction.js\";\nimport { receiptFacts } from \"../../errors/transaction.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport type {\n AirdropAttemptRequest,\n AirdropResponse,\n AirdropSucceeded,\n} from \"../../types/rpc.js\";\nimport { waitForTransactionReceipt } from \"./waitForTransactionReceipt.js\";\nimport { assertTransactionSuccess } from \"../../wallet/execution.js\";\nimport { classifyReadError } from \"../../transport/readError.js\";\nimport { isCancellation } from \"../../wallet/transactionErrors.js\";\nimport {\n createSubmissionEvidence,\n type SubmissionEvidence,\n} from \"../../transaction/submissionEvidence.js\";\nimport { beforeDeadline, validateTimer } from \"../deadline.js\";\n\nexport interface RequestAirdropOptions {\n readonly recipient: Uint8Array;\n readonly clientNonce?: Uint8Array;\n readonly expectedNetworkHash?: Uint8Array;\n readonly timeoutMs?: number;\n readonly signal?: AbortSignal;\n}\n/** Perform exactly one faucet call. It neither polls nor repeats an ambiguous attempt. */\nexport async function requestAirdropAttempt(\n client: Pick<RpcClient, \"faucet_requestAirdrop\">,\n request: AirdropAttemptRequest,\n options: TransportRequestOptions = {},\n): Promise<AirdropResponse> {\n return client.faucet_requestAirdrop(request, options);\n}\n/**\n * Call the faucet once, then observe a returned pending hash using read-only calls.\n * When funding stops, throws code `fundingStopped` without permission to call the\n * faucet again. `transaction` is present when the faucet identified a\n * transaction; reconcile with `context.request.clientNonce`.\n */\nexport async function requestAirdrop(\n client: RpcClient,\n options: RequestAirdropOptions,\n): Promise<AirdropSucceeded> {\n const timeoutMs = options.timeoutMs ?? 60000;\n validateTimer(timeoutMs, \"timeoutMs\");\n const request = {\n recipient: new Uint8Array(options.recipient),\n clientNonce: options.clientNonce\n ? new Uint8Array(options.clientNonce)\n : crypto.getRandomValues(new Uint8Array(16)),\n networkHash: new Uint8Array(\n options.expectedNetworkHash ?? client.discovery.network.networkHash,\n ),\n };\n if (\n request.recipient.length !== 32 ||\n request.networkHash.length !== 32 ||\n request.clientNonce.length < 1 ||\n request.clientNonce.length > 32\n )\n throw new RangeError(\n \"Funding requires 32-byte addresses/hashes and a 1–32 byte nonce\",\n );\n client.requireMethods([\n \"faucet_requestAirdrop\",\n \"getNetworkInfo\",\n \"getTransactionReceipt\",\n \"getTransactionStatus\",\n ]);\n const deadline = performance.now() + timeoutMs;\n let lastResponse: AirdropResponse | undefined;\n let timedOut = false;\n const timeout = () => {\n timedOut = true;\n return new DOMException(\"Funding observation timed out\", \"TimeoutError\");\n };\n const run = <T>(operation: (signal: AbortSignal) => Promise<T>) =>\n beforeDeadline(operation, deadline, options.signal, timeout);\n // Evidence must come from this faucet call or from observing its hash.\n let phase: \"network\" | \"faucet\" | \"observe\" = \"network\";\n try {\n const network = await run((signal) =>\n client.getNetworkInfo({}, { signal }),\n );\n if (network.networkHash.some((v, i) => v !== request.networkHash[i]))\n throw rpcIncompatible(\n \"network\",\n \"Funding endpoint network does not match\",\n );\n phase = \"faucet\";\n lastResponse = await run((signal) =>\n requestAirdropAttempt(\n client,\n { recipient: request.recipient, clientNonce: request.clientNonce },\n { signal },\n ),\n );\n if (isUnsupportedRpcValue(lastResponse))\n throw unsupported(\"Unsupported faucet response\", lastResponse);\n if (lastResponse.attemptStatus === \"succeeded\") {\n if (isUnsupportedRpcValue(lastResponse.execution))\n throw unsupported(\n \"Unsupported faucet execution outcome\",\n lastResponse.execution,\n );\n return lastResponse;\n }\n // A pending attempt may not have a transaction yet. That is valid, but\n // there is no hash to observe, so stop and keep the response.\n if (!lastResponse.transactionHash)\n throw new Error(\"The faucet attempt is pending without a transaction\");\n phase = \"observe\";\n const receipt = await waitForTransactionReceipt(\n client,\n lastResponse.transactionHash,\n {\n expectedNetworkHash: request.networkHash,\n timeoutMs: Math.max(0, deadline - performance.now()),\n signal: options.signal,\n },\n );\n assertTransactionSuccess(receipt);\n return {\n attemptStatus: \"succeeded\",\n recipient: lastResponse.recipient,\n rawAmount: lastResponse.rawAmount,\n transactionHash: receipt.transactionHash,\n blockHeight: receipt.blockHeight,\n execution: receipt.execution,\n };\n } catch (cause) {\n // An abort reason can be any value, so take no evidence from it.\n const cancelled = isCancellation(cause, options.signal);\n const response = isUnsupportedRpcValue(lastResponse)\n ? undefined\n : lastResponse;\n const native =\n !cancelled &&\n phase === \"faucet\" &&\n isThruputError(cause, \"nativeRpcError\")\n ? cause.context.data\n : undefined;\n const observed =\n !cancelled &&\n phase === \"observe\" &&\n isThruputError(cause) &&\n cause.transaction &&\n response?.transactionHash &&\n bytesEqual(cause.transaction.hash, response.transactionHash)\n ? cause.transaction\n : undefined;\n const receipt =\n observed?.receipt ??\n (native && \"receipt\" in native ? native.receipt : undefined);\n const hash =\n receipt?.transactionHash ??\n observed?.hash ??\n (native && \"transactionHash\" in native\n ? native.transactionHash\n : undefined) ??\n response?.transactionHash;\n // The native reader checked these signed bytes against the hash.\n const signed =\n native && \"signedTransaction\" in native\n ? native.signedTransaction\n : undefined;\n const submission =\n signed && hash\n ? fundingSubmission(signed, request.networkHash, hash)\n : undefined;\n const reason: TransactionReason = options.signal?.aborted\n ? \"cancelled\"\n : timedOut\n ? \"timeout\"\n : native\n ? classifyReadError(cause) === \"transient\"\n ? \"disconnected\"\n : \"nodeRejected\"\n : \"observationFailed\";\n const extra = submission ? { submission } : {};\n const transaction: TransactionFactsInput | undefined = receipt\n ? { ...receiptFacts(receipt, reason), ...extra }\n : observed\n ? {\n hash: observed.hash,\n outcome: observed.outcome,\n reason: observed.reason,\n }\n : hash\n ? {\n hash,\n outcome: \"unknown\",\n // A succeeded attempt reaches here only with an unsupported execution value.\n reason:\n response?.attemptStatus === \"succeeded\"\n ? \"outcomeUnsupported\"\n : reason,\n ...extra,\n }\n : undefined;\n const committed =\n receipt ??\n (response?.attemptStatus === \"succeeded\" ? response : undefined);\n const knownCommitment =\n observed && isThruputError(cause, \"transactionOutcomeUnknown\")\n ? cause.context.knownCommitment\n : committed\n ? {\n networkHash: request.networkHash.slice(),\n transactionHash: new Uint8Array(committed.transactionHash),\n blockHeight: committed.blockHeight,\n }\n : undefined;\n throw new ThruputError(\"fundingStopped\", \"Funding observation stopped\", {\n context: {\n request,\n ...(lastResponse === undefined ? {} : { lastResponse }),\n ...(knownCommitment ? { knownCommitment } : {}),\n },\n cause,\n ...(transaction ? { transaction } : {}),\n });\n }\n}\n\n/** Signed faucet bytes as submission evidence, when they match the hash. */\nfunction fundingSubmission(\n signedTransaction: Uint8Array,\n networkHash: Uint8Array,\n hash: Uint8Array,\n): SubmissionEvidence | undefined {\n try {\n const evidence = createSubmissionEvidence(signedTransaction, networkHash);\n return bytesEqual(evidence.transactionHash, hash) ? evidence : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction bytesEqual(left: Uint8Array, right: Uint8Array): boolean {\n return (\n left.length === right.length && left.every((byte, i) => byte === right[i])\n );\n}\n\nfunction unsupported(\n message: string,\n value: UnsupportedRpcValue,\n): ThruputError<\"rpcValueUnsupported\"> {\n return new ThruputError(\"rpcValueUnsupported\", message, {\n context: { value },\n });\n}\n","import type {\n ContractEvent,\n ContractEventFilterInput,\n DecodedContractEvent,\n} from \"../../contract/event.js\";\nimport { contractDecodeFailed } from \"../../contract/errors.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport type {\n EmittedEvent,\n EventPage,\n EventQuery,\n IdentifiedEvent,\n} from \"../../types/rpc.js\";\nimport type { RpcClient } from \"../../rpc/client.js\";\n\n/** One generated event descriptor with named filters and ordinary page controls. */\nexport type ContractEventQuery<\n TName extends string,\n TTopics,\n TFields,\n TFilter,\n> = (EventQuery extends infer Q\n ? Q extends EventQuery\n ? Omit<Q, \"filters\">\n : never\n : never) &\n ContractEventFilterInput<NoInfer<TFilter>> & {\n event: ContractEvent<TName, TTopics, TFields, TFilter>;\n };\n\n/** A decoded event with its emitter, transaction, and position in history. */\nexport type IdentifiedContractEvent<\n TName extends string,\n TTopics,\n TFields,\n> = DecodedContractEvent<TName, TTopics, TFields> &\n Omit<IdentifiedEvent, \"event\"> &\n Pick<EmittedEvent, \"address\">;\n\n/** One decoded event page, retaining the RPC cursor and indexer bounds. */\nexport type ContractEventPage<TName extends string, TTopics, TFields> = Omit<\n EventPage,\n \"events\"\n> & {\n events: IdentifiedContractEvent<TName, TTopics, TFields>[];\n};\n\n/**\n * Fetch exactly one page using a generated event's filter and decoder.\n *\n * No additional pages are fetched. Pass the returned cursor into the next call\n * with the same filters. Malformed events and unexpected signatures throw\n * code `contractDecodeFailed` rather than silently disappearing from the page.\n *\n * @example\n * ```ts\n * const page = await getContractEvents(client, {\n * event: thruput_erc20_if.v0_1.events.TransferEvent,\n * addresses: [tokenAddress],\n * topics: { to: accountAddress },\n * start: { order: \"ascending\", anchor: { kind: \"atBeginning\" } },\n * limit: 20,\n * }, { signal });\n * ```\n */\nexport async function getContractEvents<\n TName extends string,\n TTopics,\n TFields,\n TFilter,\n>(\n client: Pick<RpcClient, \"getEvents\">,\n query: ContractEventQuery<TName, TTopics, TFields, TFilter>,\n options?: TransportRequestOptions,\n): Promise<ContractEventPage<TName, TTopics, TFields>> {\n options?.signal?.throwIfAborted();\n const { event, addresses, topics, ...pageQuery } = query;\n const page = await client.getEvents(\n {\n ...pageQuery,\n filters: [event.filter({ addresses, topics })],\n },\n options,\n );\n return {\n ...page,\n events: page.events.map(({ event: raw, ...identity }) => {\n const decoded = event.decode(raw);\n if (decoded === null) {\n throw contractDecodeFailed(\n \"Event query returned an unexpected event signature\",\n );\n }\n return { ...decoded, ...identity, address: raw.address };\n }),\n };\n}\n","import type { TransportRequestOptions } from \"../../transport/types.js\";\nimport type {\n EventPage,\n TransactionRefPage,\n IterationOrder,\n HistoryStart,\n} from \"../../types/rpc.js\";\nimport { toHex0x } from \"../hex.js\";\nimport { ThruputError } from \"../../errors/thruputError.js\";\n\n/** Returned only after the caller resumes past the terminal page. Persist with processed data. */\nexport interface HistoryCompletion {\n readonly watermarkBlockHeight: bigint;\n /** Ascending range fully consumed; absent for descending or an anchor above the watermark. */\n readonly completedThroughBlockHeight?: bigint;\n}\ntype Key = readonly [bigint, string, number];\nconst compare = (a: Key, b: Key) => {\n for (let i = 0; i < 3; i++) {\n if (a[i]! < b[i]!) return -1;\n if (a[i]! > b[i]!) return 1;\n }\n return 0;\n};\n/** Shared cross-page checks; single-page shape, filter and identity checks belong to RpcClient. */\nexport async function* walkHistory<P extends EventPage | TransactionRefPage>(\n fetch: (cursor: string | undefined) => Promise<P>,\n kind: \"events\" | \"transactions\",\n scope:\n | { start: HistoryStart }\n | { blockHeight: bigint; order: IterationOrder },\n options: TransportRequestOptions,\n): AsyncGenerator<P, HistoryCompletion | void, unknown> {\n const order = \"start\" in scope ? scope.start.order : scope.order;\n let cursor: string | undefined,\n watermark: bigint | undefined,\n lowerBound: bigint | undefined,\n upperBound: bigint | undefined,\n last: Key | undefined;\n const cursors = new Set<string>(),\n identities = new Set<string>();\n for (;;) {\n options.signal?.throwIfAborted();\n const page = await fetch(cursor);\n options.signal?.throwIfAborted();\n const fail = (message: string): never => {\n throw new ThruputError(\"historyWalkFailed\", message, {\n context: { page },\n });\n };\n const rows =\n kind === \"events\"\n ? (page as EventPage).events\n : (page as TransactionRefPage).transactions;\n if (watermark === undefined) {\n watermark = page.latestIndexedBlockHeight;\n lowerBound =\n \"start\" in scope &&\n order === \"ascending\" &&\n scope.start.anchor.kind === \"atHeight\"\n ? scope.start.anchor.blockHeight\n : page.oldestIndexedBlockHeight;\n upperBound =\n \"start\" in scope &&\n order === \"descending\" &&\n scope.start.anchor.kind === \"atHeight\" &&\n scope.start.anchor.blockHeight < watermark\n ? scope.start.anchor.blockHeight\n : watermark;\n }\n if (\"blockHeight\" in scope) {\n if (\n scope.blockHeight < page.oldestIndexedBlockHeight ||\n scope.blockHeight > page.latestIndexedBlockHeight\n )\n fail(\"Requested block is outside current indexed coverage\");\n } else {\n if (page.latestIndexedBlockHeight < watermark)\n fail(\"History coverage regressed below the initial watermark\");\n if (page.oldestIndexedBlockHeight > lowerBound!)\n fail(\"History retention no longer covers the requested range\");\n }\n for (const row of rows) {\n if (\n \"blockHeight\" in scope\n ? row.blockHeight !== scope.blockHeight\n : row.blockHeight > upperBound! || row.blockHeight < lowerBound!\n )\n fail(\"History row is outside the fixed walk scope\");\n const hash = toHex0x(row.transactionHash),\n sequence =\n kind === \"events\"\n ? (row as EventPage[\"events\"][number]).sequenceNumber\n : 0;\n const identity = kind === \"events\" ? `${hash}/${sequence}` : hash;\n if (identities.has(identity))\n fail(\"History returned a duplicate identity across pages\");\n const key: Key = [row.blockHeight, hash, sequence];\n if (\n last &&\n (order === \"ascending\"\n ? compare(last, key) >= 0\n : compare(last, key) <= 0)\n )\n fail(\"History order did not advance across pages\");\n identities.add(identity);\n last = key;\n }\n // Capture cursor before the caller can mutate the yielded page.\n const next = page.nextCursor;\n if (next !== null) {\n if (cursors.has(next))\n fail(\"History returned a repeated pagination cursor\");\n cursors.add(next);\n }\n yield page;\n if (next === null) {\n options.signal?.throwIfAborted();\n if (\"blockHeight\" in scope) return;\n return {\n watermarkBlockHeight: watermark,\n ...(order === \"ascending\" && lowerBound! <= watermark\n ? { completedThroughBlockHeight: watermark }\n : {}),\n };\n }\n cursor = next;\n }\n}\n","import type { RpcClient } from \"../../rpc/client.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport type { EventPage, EventQuery } from \"../../types/rpc.js\";\nimport { walkHistory, type HistoryCompletion } from \"./historyWalk.js\";\nexport type EventWalkQuery = Extract<EventQuery, { start: unknown }>;\n/** Start a fixed event range. Saved opaque cursors remain available through getEvents. */\nexport function iterateEventPages(\n client: Pick<RpcClient, \"getEvents\">,\n query: EventWalkQuery,\n options: TransportRequestOptions = {},\n): AsyncGenerator<EventPage, HistoryCompletion, unknown> {\n const snapshot = structuredClone(query);\n if (!snapshot.start || snapshot.cursor !== undefined)\n throw new TypeError(\"Event walks require an explicit start\");\n return walkHistory(\n (cursor) =>\n client.getEvents(\n cursor === undefined\n ? snapshot\n : { filters: snapshot.filters, limit: snapshot.limit, cursor },\n options,\n ),\n \"events\",\n { start: snapshot.start },\n options,\n ) as AsyncGenerator<EventPage, HistoryCompletion, unknown>;\n}\n","import type { RpcClient } from \"../../rpc/client.js\";\nimport type {\n ContractViewRequest,\n ContractViewOutcome,\n ContractException,\n} from \"../../contract/method.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport { contractDecodeFailed } from \"../../contract/errors.js\";\n\n/** Typed calls and an optional minimum committed height for one snapshot read. */\nexport interface ReadViewsRequest<\n TCalls extends readonly ContractViewRequest[],\n> {\n calls: TCalls;\n minStateBlockHeight?: bigint;\n}\n\n/** Ordered typed outcomes, preserving each tuple position's return and exception types. */\nexport interface ReadViewsResponse<\n TCalls extends readonly ContractViewRequest[],\n> {\n stateBlockHeight: bigint;\n results: {\n [K in keyof TCalls]: TCalls[K] extends ContractViewRequest<infer R, infer E>\n ? ContractViewOutcome<R, ContractException<E>>\n : never;\n };\n}\n\n/**\n * Read generated method requests against one shared committed snapshot.\n * Contract aborts and faults are outcomes. Transport, freshness, and decoding\n * failures reject the group. Calls are never split or emulated with separate views.\n *\n * @example\n * ```ts\n * const result = await client.readViews({ calls: [\n * ERC20.v0_1.totalSupply.viewRequest({ address: token }),\n * ERC20.v0_1.getBalanceOf.viewRequest({ address: token, args: { addr: owner } }),\n * ] });\n * ```\n */\nexport async function readViews<\n const TCalls extends readonly ContractViewRequest[],\n>(\n client: Pick<RpcClient, \"simulateInvocations\">,\n request: ReadViewsRequest<TCalls>,\n options?: TransportRequestOptions,\n): Promise<ReadViewsResponse<TCalls>> {\n options?.signal?.throwIfAborted();\n // Retain the decoder order across the asynchronous request even if the caller\n // later edits its array. simulateInvocations serializes the byte inputs before yielding.\n const calls = request.calls.map((call) => {\n if (\"minStateBlockHeight\" in call) {\n throw new TypeError(\n \"Set minStateBlockHeight on readViews, not on a prepared call\",\n );\n }\n return {\n request: call.request,\n name: call.method.name,\n decode: call.method.decodeViewOutcome,\n };\n });\n const response = await client.simulateInvocations(\n {\n invocations: calls.map((call) => call.request),\n ...(request.minStateBlockHeight === undefined\n ? {}\n : { minStateBlockHeight: request.minStateBlockHeight }),\n },\n options,\n );\n const results = calls.map((call, index) => {\n try {\n return call.decode({\n ...response.results[index]!,\n stateBlockHeight: response.stateBlockHeight,\n });\n } catch (cause) {\n throw contractDecodeFailed(\n `Failed to decode readViews result ${index} (${call.name})`,\n { cause },\n );\n }\n });\n // simulateInvocations validates the exact count; each position uses its retained decoder.\n return {\n stateBlockHeight: response.stateBlockHeight,\n results: results as ReadViewsResponse<TCalls>[\"results\"],\n };\n}\n","import type { RpcClient } from \"../../rpc/client.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport type {\n RootAddressTransactionQuery,\n BlockTransactionQuery,\n TransactionRefPage,\n} from \"../../types/rpc.js\";\nimport { walkHistory, type HistoryCompletion } from \"./historyWalk.js\";\nexport type RootAddressWalkQuery = Extract<\n RootAddressTransactionQuery,\n { start: unknown }\n>;\nexport type BlockTransactionWalkQuery = Extract<\n BlockTransactionQuery,\n { start: unknown }\n>;\n/** Transactions sent by this root address; incoming transfers use token events. */\nexport function iterateTransactionsByRootAddress(\n client: Pick<RpcClient, \"getTransactionsByRootAddress\">,\n query: RootAddressWalkQuery,\n options: TransportRequestOptions = {},\n): AsyncGenerator<TransactionRefPage, HistoryCompletion, unknown> {\n const snapshot = structuredClone(query);\n if (!snapshot.start || snapshot.cursor !== undefined)\n throw new TypeError(\"Root-address walks require an explicit start\");\n return walkHistory(\n (cursor) =>\n client.getTransactionsByRootAddress(\n cursor === undefined\n ? snapshot\n : { address: snapshot.address, limit: snapshot.limit, cursor },\n options,\n ),\n \"transactions\",\n { start: snapshot.start },\n options,\n ) as AsyncGenerator<TransactionRefPage, HistoryCompletion, unknown>;\n}\n/** Walk one covered block. Completion never establishes a whole-chain checkpoint. */\nexport function iterateTransactionsByBlock(\n client: Pick<RpcClient, \"getTransactionsByBlock\">,\n query: BlockTransactionWalkQuery,\n options: TransportRequestOptions = {},\n): AsyncGenerator<TransactionRefPage, void, unknown> {\n const snapshot = structuredClone(query);\n if (!snapshot.start || snapshot.cursor !== undefined)\n throw new TypeError(\"Block walks require an explicit start\");\n return walkHistory(\n (cursor) =>\n client.getTransactionsByBlock(\n cursor === undefined\n ? snapshot\n : {\n blockHeight: snapshot.blockHeight,\n limit: snapshot.limit,\n cursor,\n },\n options,\n ),\n \"transactions\",\n { blockHeight: snapshot.blockHeight, order: snapshot.start.order },\n options,\n ) as AsyncGenerator<TransactionRefPage, void, unknown>;\n}\n","import {\n codec,\n ContractType,\n deserialize,\n sha256Hash,\n} from \"@thruputchain/protocol\";\nimport {\n readContractArtifactSpec,\n type ContractArtifactSpec,\n} from \"../../contract/artifact.js\";\nimport { bytesEqual } from \"../../contract/event.js\";\nimport { contractVerificationFailed } from \"../../contract/errors.js\";\nimport type { RpcClient } from \"../../rpc/client.js\";\nimport type {\n RpcContractDeployment,\n RpcContractDeploymentResult,\n} from \"../../rpc/generated.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\n\n/** Snapshot deployment evidence and its authenticated metadata, if deployed. */\nexport interface ContractSpecResult extends RpcContractDeploymentResult {\n artifactSpec: ContractArtifactSpec | null;\n}\n\n/**\n * Resolve a current deployment and verify its embedded spec against its hash.\n * Missing artifacts and invalid responses throw; neither means no deployment.\n * The snapshot does not establish which implementation produced historical events.\n */\nexport async function getContractSpec(\n client: RpcClient,\n request: { address: Uint8Array },\n options?: TransportRequestOptions,\n): Promise<ContractSpecResult> {\n client.requireMethods([\"getContractDeployment\", \"getContractArtifact\"]);\n const address = new Uint8Array(request.address);\n const result = await client.getContractDeployment({ address }, options);\n if (!bytesEqual(address, result.address))\n throw contractVerificationFailed(\"Contract deployment address mismatch\");\n if (result.deployment === null) return { ...result, artifactSpec: null };\n return {\n ...result,\n artifactSpec: await readDeploymentSpec(client, result.deployment, options),\n };\n}\n\n/** Shared identity validation for explicit deployments and effective contract selection. */\nexport async function readDeploymentSpec(\n client: RpcClient,\n deployment: RpcContractDeployment,\n options?: TransportRequestOptions,\n): Promise<ContractArtifactSpec> {\n const artifact = await client.getContractArtifact(\n { hash: deployment.hash },\n options,\n );\n if (!bytesEqual(artifact.hash, deployment.hash))\n throw contractVerificationFailed(\n \"Contract artifact response hash mismatch\",\n );\n const artifactSpec = readContractArtifactSpec(\n artifact.contractXdr,\n sha256Hash(deployment.hash),\n );\n const contract = deserialize(artifact.contractXdr, codec.Contract);\n const size =\n contract.contract_type === ContractType.kRv32\n ? contract.rv32_contract.data.length\n : 0;\n if (\n contract.contract_type !== deployment.contractType ||\n size !== deployment.size\n ) {\n throw contractVerificationFailed(\n \"Contract artifact does not match deployment metadata\",\n );\n }\n return artifactSpec;\n}\n","import {\n ContractType,\n HogexecPrecompiledNativeContracts,\n} from \"@thruputchain/protocol\";\nimport { hashContract } from \"../../contract/hash.js\";\nimport { bytesEqual } from \"../../contract/event.js\";\nimport { contractVerificationFailed } from \"../../contract/errors.js\";\nimport type { ContractArtifactSpec } from \"../../contract/artifact.js\";\nimport { spec as defaultWalletSpec } from \"../../contracts/default_wallet.js\";\nimport type { ContractSpec } from \"../../contract/spec.js\";\nimport type { RpcClient } from \"../../rpc/client.js\";\nimport { ThruputError } from \"../../errors/thruputError.js\";\nimport type { RpcEffectiveContractResult } from \"../../rpc/generated.js\";\nimport { UnsupportedRpcValue } from \"../../rpc/codec.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport { readDeploymentSpec } from \"./getContractSpec.js\";\n\nconst nativeWalletHash = hashContract({\n contract_type: ContractType.kNative,\n native_contract_id:\n HogexecPrecompiledNativeContracts.kNativeContractDefaultWallet,\n});\n\nexport interface EffectiveContractSpecResult extends RpcEffectiveContractResult {\n artifactSpec: ContractArtifactSpec | null;\n /** Recognized native interface; not artifact-bound or proof of runtime code. */\n nativeInterface: { name: \"DefaultWallet\"; spec: ContractSpec } | null;\n}\n\n/**\n * Discover current contract selection without inferring authorization or historical identity.\n * Root context allows the chain-configured fallback; nested excludes that fallback.\n * Transaction-local deployments are outside this committed-state reading.\n */\nexport async function getEffectiveContractSpec(\n client: RpcClient,\n request: { address: Uint8Array; context: \"root\" | \"nested\" },\n options?: TransportRequestOptions,\n): Promise<EffectiveContractSpecResult> {\n client.requireMethods([\"getEffectiveContract\", \"getContractArtifact\"]);\n const address = new Uint8Array(request.address);\n const context = request.context;\n const result = await client.getEffectiveContract(\n { address, context },\n options,\n );\n if (!bytesEqual(address, result.address) || result.context !== context)\n throw contractVerificationFailed(\n \"Effective contract request identity mismatch\",\n );\n if (result.selection instanceof UnsupportedRpcValue)\n throw new ThruputError(\n \"rpcValueUnsupported\",\n \"Unsupported effective contract selection\",\n { context: { value: result.selection } },\n );\n if (result.selection === null)\n return { ...result, artifactSpec: null, nativeInterface: null };\n if (context === \"nested\" && result.selection.source === \"networkDefault\")\n throw contractVerificationFailed(\n \"Network default cannot apply to a nested invocation\",\n );\n const contract = result.selection.contract;\n const artifactSpec = await readDeploymentSpec(client, contract, options);\n const nativeInterface =\n artifactSpec.kind === \"native\" &&\n bytesEqual(contract.hash, nativeWalletHash)\n ? { name: \"DefaultWallet\" as const, spec: defaultWalletSpec }\n : null;\n return { ...result, artifactSpec, nativeInterface };\n}\n","import {\n codec,\n contractEntrypointID,\n deserialize,\n gasAmount,\n calldata,\n sha256Hash,\n type AuthTokenNode,\n type Invocation,\n} from \"@thruputchain/protocol\";\nimport { DefaultWallet } from \"../../contracts/default_wallet.js\";\nimport { bytesEqual } from \"../../contract/event.js\";\nimport { deriveContractAddress } from \"../../derivation/contractAddress.js\";\n\n/** Requested child invocations, never proof of execution or child outputs. */\nexport interface WalletRequests {\n wrapper: \"DefaultWallet.execute\" | \"DefaultWallet.deploy\";\n requestedCalls: Invocation[];\n}\n\n/** A mint in its original position, including the bytes of an unreadable grant. */\nexport type WalletMint =\n | { kind: \"decoded\"; node: AuthTokenNode }\n | { kind: \"unreadable\"; bytes: Uint8Array };\n\n/** Calls and grants requested by a wallet root, in calldata order. */\nexport interface WalletRequestDescription {\n wrapper: WalletRequests[\"wrapper\"];\n mints: WalletMint[];\n calls: {\n invocation: Invocation;\n /** Ordered references to mints or to tokens returned by earlier calls. */\n tokens: DefaultWallet.v0_1.ExecuteArgs[\"calls\"][number][\"tokens\"];\n }[];\n}\n\n/**\n * Describe the grants and calls in a known DefaultWallet root before execution.\n * The caller must establish wallet identity. An unknown selector returns null;\n * malformed wrapper calldata throws. An unreadable mint retains its bytes and\n * position. Token references describe requests; they do not establish that a\n * token exists or will be returned.\n */\nexport function describeDefaultWalletRequests(\n root: Invocation,\n): WalletRequestDescription | null {\n const requests = readWalletRequests(root);\n if (!requests) return null;\n return { ...requests, mints: requests.mints.map(decodeMint) };\n}\n\nfunction decodeMint(bytes: Uint8Array): WalletMint {\n try {\n return { kind: \"decoded\", node: deserialize(bytes, codec.AuthTokenNode) };\n } catch {\n return { kind: \"unreadable\", bytes };\n }\n}\n\n/**\n * Interpret a known DefaultWallet root using built-in binding descriptors.\n * Call only after identifying the root as DefaultWallet; matching selectors\n * alone do not establish wallet identity. Malformed recognized inputs throw,\n * as does an `execute` that mints or forwards auth tokens. To read grants,\n * use {@link describeDefaultWalletRequests}.\n */\nexport function decodeDefaultWalletRequests(\n root: Invocation,\n): WalletRequests | null {\n const requests = readWalletRequests(root);\n if (!requests) return null;\n // A list of invocations would omit the authority the wallet grants to calls.\n if (\n requests.mints.length > 0 ||\n requests.calls.some((call) => call.tokens.length > 0)\n ) {\n throw new Error(\n \"DefaultWallet.execute mints or forwards auth tokens, which requested calls cannot represent\",\n );\n }\n return {\n wrapper: requests.wrapper,\n requestedCalls: requests.calls.map((call) => call.invocation),\n };\n}\n\ninterface RawWalletRequests {\n wrapper: WalletRequests[\"wrapper\"];\n mints: Uint8Array[];\n calls: WalletRequestDescription[\"calls\"];\n}\n\nfunction readWalletRequests(root: Invocation): RawWalletRequests | null {\n if (bytesEqual(root.entrypoint, DefaultWallet.v0_1.execute.entrypoint)) {\n const { mints, calls } = DefaultWallet.v0_1.execute.decodeArgs(\n root.calldata,\n );\n return {\n wrapper: \"DefaultWallet.execute\",\n mints,\n calls: calls.map((call) => ({\n invocation: {\n invoked_address: call.target,\n entrypoint: contractEntrypointID(call.entrypoint),\n gas_limit: gasAmount(call.gas_limit),\n calldata: calldata(call.calldata),\n },\n tokens: call.tokens,\n })),\n };\n }\n if (bytesEqual(root.entrypoint, DefaultWallet.v0_1.deploy.entrypoint)) {\n const args = DefaultWallet.v0_1.deploy.decodeArgs(root.calldata);\n const init = args.initializer;\n return {\n wrapper: \"DefaultWallet.deploy\",\n mints: [],\n calls: init\n ? [\n {\n invocation: {\n invoked_address: deriveContractAddress(\n root.invoked_address,\n sha256Hash(args.nonce),\n sha256Hash(args.contractHash),\n ),\n entrypoint: contractEntrypointID(init.entrypoint),\n gas_limit: gasAmount(init.gas_limit),\n calldata: calldata(init.calldata),\n },\n tokens: [],\n },\n ]\n : [],\n };\n }\n return null;\n}\n","import { sha256 } from \"@noble/hashes/sha2.js\";\nimport {\n codec,\n deserialize,\n serialize,\n type Transaction,\n} from \"@thruputchain/protocol\";\nimport { bytesEqual } from \"../../contract/event.js\";\nimport {\n contractVerificationFailed,\n errorText,\n} from \"../../contract/errors.js\";\nimport type { RpcClient } from \"../../rpc/client.js\";\nimport { UnsupportedRpcValue } from \"../../rpc/codec.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\n\n/** Canonical retained input verified against the requested public transaction hash. */\nexport type VerifiedTransactionInput =\n | {\n status: \"available\";\n transactionHash: Uint8Array;\n blockHeight: bigint;\n transactionXdr: Uint8Array;\n transaction: Transaction;\n }\n | { status: \"unavailable\" }\n | UnsupportedRpcValue;\n\n/**\n * Read and authenticate a retained Transaction, including its root invocation.\n * Unavailable does not prove nonexecution. A matching body hash authenticates\n * neither signatures nor the reported block height, and does not imply success.\n */\nexport async function readTransactionInput(\n client: RpcClient,\n request: { transactionHash: Uint8Array },\n options?: TransportRequestOptions,\n): Promise<VerifiedTransactionInput> {\n client.requireMethods([\"getTransactionInput\"]);\n const hash = new Uint8Array(request.transactionHash);\n const result = await client.getTransactionInput(\n { transactionHash: hash },\n options,\n );\n if (result instanceof UnsupportedRpcValue || result.status === \"unavailable\")\n return result;\n try {\n if (result.transactionXdr.length > 4 * 1024 * 1024)\n throw new Error(\"Transaction input exceeds 4 MiB\");\n if (\n !bytesEqual(result.transactionHash, hash) ||\n !bytesEqual(sha256(result.transactionXdr), hash)\n ) {\n throw new Error(\"Retained transaction input hash mismatch\");\n }\n const transaction = deserialize(result.transactionXdr, codec.Transaction);\n if (\n !bytesEqual(\n serialize(transaction, codec.Transaction),\n result.transactionXdr,\n )\n ) {\n throw new Error(\"Noncanonical Transaction XDR\");\n }\n return { ...result, transaction };\n } catch (cause) {\n throw contractVerificationFailed(\n errorText(cause) ?? \"Invalid transaction input\",\n { cause },\n );\n }\n}\n","import {\n serialize,\n codec,\n sha256Hash,\n type SignedTransaction,\n type SHA256Hash,\n} from \"@thruputchain/protocol\";\nimport type { RpcClient } from \"../../rpc/client.js\";\nimport type { TransportRequestOptions } from \"../../transport/types.js\";\nimport {\n assertTransactionAdmission,\n createSubmissionEvidence,\n} from \"../../wallet/execution.js\";\nimport { isThruputError } from \"../../errors/thruputError.js\";\nimport { withTransactionFacts } from \"../../errors/transaction.js\";\nimport {\n isCancellation,\n isLocalRequestError,\n reasonAfterDispatch,\n transactionNotSubmitted,\n transactionOutcomeUnknown,\n} from \"../../wallet/transactionErrors.js\";\n\n/**\n * Serialize and submit once through the native RPC boundary.\n * Every failure has `transaction` facts with the signed bytes and destination\n * discovery network; that network does not prove the signing network of an\n * already-signed envelope. Unknown admission throws code\n * `transactionAdmissionUnsupported`. RPC and transport failures keep their\n * code, with outcome `unknown`, or `notSubmitted` for a local request error.\n */\nexport async function sendTransaction(\n client: Pick<RpcClient, \"sendTransaction\" | \"discovery\">,\n signedTx: SignedTransaction,\n options?: TransportRequestOptions,\n): Promise<SHA256Hash> {\n const evidence = createSubmissionEvidence(\n serialize(signedTx, codec.SignedTransaction),\n client.discovery.network.networkHash,\n );\n // Nothing was sent yet, so an earlier abort is notSubmitted, not unknown.\n if (options?.signal?.aborted)\n throw transactionNotSubmitted(evidence, \"cancelled\", options.signal.reason);\n let result;\n try {\n result = await client.sendTransaction(\n { signedTransaction: evidence.signedTransaction },\n options,\n );\n } catch (cause) {\n const signal = options?.signal;\n // An abort reason can be any value, including another transaction's error.\n if (isCancellation(cause, signal))\n throw transactionOutcomeUnknown(evidence, \"cancelled\", cause);\n const local = isLocalRequestError(cause, signal);\n const reason = local\n ? \"requestInvalid\"\n : reasonAfterDispatch(cause, signal);\n if (!isThruputError(cause))\n throw transactionOutcomeUnknown(evidence, reason, cause);\n throw withTransactionFacts(cause, {\n hash: evidence.transactionHash,\n outcome: local ? \"notSubmitted\" : \"unknown\",\n reason,\n submission: evidence,\n });\n }\n assertTransactionAdmission(result, evidence);\n return sha256Hash(result.transactionHash);\n}\n"],"mappings":";;;;;;;;;;;;;;AA6BA,SAAS,eACP,iBACA,QACA,UACA,OACA,iBACA,YAC2C;CAC3C,OAAO,IAAIA,gBAAAA,aACT,6BACA,WACI,sCAAA,GAAA,6BAAA,SAAA,CAA8C,eAAe,MAC7D,kCAAA,GAAA,6BAAA,SAAA,CAA0C,eAAe,KAC7D;EACE,SAAS;GACP,GAAI,kBAAkB,EAAE,gBAAgB,IAAI,CAAC;GAC7C,GAAI,aAAa,EAAE,WAAW,IAAI,CAAC;EACrC;EACA,GAAI,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM;EACvC,aAAa;GAAE,MAAM;GAAiB,SAAS;GAAW;EAAO;CACnE,CACF;AACF;;AAGA,IAAM,qBAAN,cAAiC,MAAM,CAAC;;AAGxC,SAAS,cACP,aACA,YACmB;CACnB,IAAI,gBAAgB,KAAA,GAAW,OAAO;CACtC,IAAI,eAAe,KAAA,GAAW,OAAO;CACrC,IAAI,sBAAsBC,gBAAA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KAAK,6BACpB,EAAE,MAAM,CACV;CACF;AACF;;;;;;;;;;;ACxCA,eAAsB,gBACpB,QACA,UACA,SACqB;CACrB,MAAM,WAAWC,uBAAAA,0BAAAA,GAAAA,uBAAAA,UAAAA,CACL,UAAUC,uBAAAA,MAAM,iBAAiB,GAC3C,OAAO,UAAU,QAAQ,WAC3B;CAEA,IAAI,SAAS,QAAQ,SACnB,MAAMC,uBAAAA,wBAAwB,UAAU,aAAa,QAAQ,OAAO,MAAM;CAC5E,IAAI;CACJ,IAAI;EACF,SAAS,MAAM,OAAO,gBACpB,EAAE,mBAAmB,SAAS,kBAAkB,GAChD,OACF;CACF,SAAS,OAAO;EACd,MAAM,SAAS,SAAS;EAExB,IAAIC,uBAAAA,eAAe,OAAO,MAAM,GAC9B,MAAMC,uBAAAA,0BAA0B,UAAU,aAAa,KAAK;EAC9D,MAAM,QAAQC,uBAAAA,oBAAoB,OAAO,MAAM;EAC/C,MAAM,SAAS,QACX,mBACAC,uBAAAA,oBAAoB,OAAO,MAAM;EACrC,IAAI,CAACC,gBAAAA,eAAe,KAAK,GACvB,MAAMH,uBAAAA,0BAA0B,UAAU,QAAQ,KAAK;EACzD,MAAMI,iBAAAA,qBAAqB,OAAO;GAChC,MAAM,SAAS;GACf,SAAS,QAAQ,iBAAiB;GAClC;GACA,YAAY;EACd,CAAC;CACH;CACA,uBAAA,2BAA2B,QAAQ,QAAQ;CAC3C,QAAA,GAAA,uBAAA,WAAA,CAAkB,OAAO,eAAe;AAC1C"}
|
package/dist/actions.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_sendInvocation = require("./sendInvocation-185ZJrta.cjs");
|
|
3
|
-
const require_actions = require("./actions-
|
|
3
|
+
const require_actions = require("./actions-CIaI049y.cjs");
|
|
4
4
|
exports.decodeDefaultWalletRequests = require_actions.decodeDefaultWalletRequests;
|
|
5
|
+
exports.describeDefaultWalletRequests = require_actions.describeDefaultWalletRequests;
|
|
5
6
|
exports.getContractEvents = require_actions.getContractEvents;
|
|
6
7
|
exports.getContractSpec = require_actions.getContractSpec;
|
|
7
8
|
exports.getEffectiveContractSpec = require_actions.getEffectiveContractSpec;
|
package/dist/actions.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Cn as ReceiptObserver, En as waitForTransactionReceipt, Sn as KnownCommitment, Tn as waitForCommitment, an as readViews, ct as BlockTransactionWalkQuery, dt as iterateTransactionsByRootAddress, ft as HistoryCompletion, gt as getContractEvents, ht as IdentifiedContractEvent, in as ReadViewsResponse, lt as RootAddressWalkQuery, mt as ContractEventQuery, n as requestAirdrop, ot as EventWalkQuery, pt as ContractEventPage, r as requestAirdropAttempt, rn as ReadViewsRequest, st as iterateEventPages, t as RequestAirdropOptions, ut as iterateTransactionsByBlock, wn as WaitForTransactionReceiptOptions } from "./requestAirdrop-T1eVn3l5.cjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as WalletMint, c as decodeDefaultWalletRequests, d as getEffectiveContractSpec, f as ContractSpecResult, i as readTransactionInput, l as describeDefaultWalletRequests, n as sendTransaction, o as WalletRequestDescription, p as getContractSpec, r as VerifiedTransactionInput, s as WalletRequests, t as sendInvocation, u as EffectiveContractSpecResult } from "./index-JKm4TBlY.cjs";
|
|
3
3
|
import { S as prepareTransaction, x as PrepareTransactionRequest } from "./execution-pSt6k620.cjs";
|
|
4
|
-
export { type BlockTransactionWalkQuery, type ContractEventPage, type ContractEventQuery, type ContractSpecResult, type EffectiveContractSpecResult, type EventWalkQuery, type HistoryCompletion, type IdentifiedContractEvent, type KnownCommitment, type PrepareTransactionRequest, type ReadViewsRequest, type ReadViewsResponse, type ReceiptObserver, type RequestAirdropOptions, type RootAddressWalkQuery, type VerifiedTransactionInput, type WaitForTransactionReceiptOptions, type WalletRequests, decodeDefaultWalletRequests, getContractEvents, getContractSpec, getEffectiveContractSpec, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, prepareTransaction, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, sendInvocation, sendTransaction, waitForCommitment, waitForTransactionReceipt };
|
|
4
|
+
export { type BlockTransactionWalkQuery, type ContractEventPage, type ContractEventQuery, type ContractSpecResult, type EffectiveContractSpecResult, type EventWalkQuery, type HistoryCompletion, type IdentifiedContractEvent, type KnownCommitment, type PrepareTransactionRequest, type ReadViewsRequest, type ReadViewsResponse, type ReceiptObserver, type RequestAirdropOptions, type RootAddressWalkQuery, type VerifiedTransactionInput, type WaitForTransactionReceiptOptions, type WalletMint, type WalletRequestDescription, type WalletRequests, decodeDefaultWalletRequests, describeDefaultWalletRequests, getContractEvents, getContractSpec, getEffectiveContractSpec, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, prepareTransaction, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, sendInvocation, sendTransaction, waitForCommitment, waitForTransactionReceipt };
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Cn as ReceiptObserver, En as waitForTransactionReceipt, Sn as KnownCommitment, Tn as waitForCommitment, an as readViews, ct as BlockTransactionWalkQuery, dt as iterateTransactionsByRootAddress, ft as HistoryCompletion, gt as getContractEvents, ht as IdentifiedContractEvent, in as ReadViewsResponse, lt as RootAddressWalkQuery, mt as ContractEventQuery, n as requestAirdrop, ot as EventWalkQuery, pt as ContractEventPage, r as requestAirdropAttempt, rn as ReadViewsRequest, st as iterateEventPages, t as RequestAirdropOptions, ut as iterateTransactionsByBlock, wn as WaitForTransactionReceiptOptions } from "./requestAirdrop-DBCOST2B.js";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as WalletMint, c as decodeDefaultWalletRequests, d as getEffectiveContractSpec, f as ContractSpecResult, i as readTransactionInput, l as describeDefaultWalletRequests, n as sendTransaction, o as WalletRequestDescription, p as getContractSpec, r as VerifiedTransactionInput, s as WalletRequests, t as sendInvocation, u as EffectiveContractSpecResult } from "./index-Dtv_GV6M.js";
|
|
3
3
|
import { S as prepareTransaction, x as PrepareTransactionRequest } from "./execution-uiuFPV0d.js";
|
|
4
|
-
export { type BlockTransactionWalkQuery, type ContractEventPage, type ContractEventQuery, type ContractSpecResult, type EffectiveContractSpecResult, type EventWalkQuery, type HistoryCompletion, type IdentifiedContractEvent, type KnownCommitment, type PrepareTransactionRequest, type ReadViewsRequest, type ReadViewsResponse, type ReceiptObserver, type RequestAirdropOptions, type RootAddressWalkQuery, type VerifiedTransactionInput, type WaitForTransactionReceiptOptions, type WalletRequests, decodeDefaultWalletRequests, getContractEvents, getContractSpec, getEffectiveContractSpec, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, prepareTransaction, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, sendInvocation, sendTransaction, waitForCommitment, waitForTransactionReceipt };
|
|
4
|
+
export { type BlockTransactionWalkQuery, type ContractEventPage, type ContractEventQuery, type ContractSpecResult, type EffectiveContractSpecResult, type EventWalkQuery, type HistoryCompletion, type IdentifiedContractEvent, type KnownCommitment, type PrepareTransactionRequest, type ReadViewsRequest, type ReadViewsResponse, type ReceiptObserver, type RequestAirdropOptions, type RootAddressWalkQuery, type VerifiedTransactionInput, type WaitForTransactionReceiptOptions, type WalletMint, type WalletRequestDescription, type WalletRequests, decodeDefaultWalletRequests, describeDefaultWalletRequests, getContractEvents, getContractSpec, getEffectiveContractSpec, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, prepareTransaction, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, sendInvocation, sendTransaction, waitForCommitment, waitForTransactionReceipt };
|
package/dist/actions.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as prepareTransaction, t as sendInvocation } from "./sendInvocation-DBaNWhr3.js";
|
|
2
|
-
import { a as
|
|
3
|
-
export { decodeDefaultWalletRequests, getContractEvents, getContractSpec, getEffectiveContractSpec, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, prepareTransaction, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, sendInvocation, sendTransaction, waitForCommitment, waitForTransactionReceipt };
|
|
2
|
+
import { a as getEffectiveContractSpec, c as iterateTransactionsByRootAddress, d as getContractEvents, f as requestAirdrop, h as waitForTransactionReceipt, i as describeDefaultWalletRequests, l as readViews, m as waitForCommitment, n as readTransactionInput, o as getContractSpec, p as requestAirdropAttempt, r as decodeDefaultWalletRequests, s as iterateTransactionsByBlock, t as sendTransaction, u as iterateEventPages } from "./actions-B7htk5FS.js";
|
|
3
|
+
export { decodeDefaultWalletRequests, describeDefaultWalletRequests, getContractEvents, getContractSpec, getEffectiveContractSpec, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, prepareTransaction, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, sendInvocation, sendTransaction, waitForCommitment, waitForTransactionReceipt };
|
package/dist/contract.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { $t as ContractUnionDef, At as topicRepresentation, B as ContractMethodInputs, Bt as ContractSpec, Ct as ContractEventTopicMetadata, Dt as bytesEqual, Et as SpecDecodedEvent, F as ContractException, Ft as ContractEnumDef, G as ContractViewFailure, Gt as ContractStructDef, H as ContractReceiptFailure, Ht as ContractSpecInterface, I as ContractExceptionMetadata, It as ContractEnumVariant, J as ContractViewRequest, Jt as ContractTypeDefKind, K as ContractViewOptions, Kt as ContractType, L as ContractFailure, Lt as ContractExceptionType, M as ContractArgumentMetadata, Mt as ContractCodecContext, N as ContractCall, Nt as createContractCodecContext, Ot as createContractEventDecoder, P as ContractCallOptions, Pt as ContractArrayType, Q as defineContractMethod, Qt as ContractUnionCaseType, R as ContractMethod, Rt as ContractField, St as ContractEventReceiptOptions, Tt as DecodedContractEvent, U as ContractReceiptOutcome, Ut as ContractSpecMethod, V as ContractReceipt, Vt as ContractSpecId, W as ContractView, Wt as ContractSpecString, X as MethodArgs, Xt as ContractUnionCase, Y as ContractViewRequestOptions, Yt as ContractTypeKind, Z as UnknownContractException, Zt as ContractUnionCaseKind, _t as ContractEvent, bt as ContractEventFilterInput, en as ContractVectorType, jt as ContractCodec, kt as defineContractEvent, nn as specIdKey, q as ContractViewOutcome, qt as ContractTypeDef, tn as formatSpecId, vt as ContractEventDefinition, wt as ContractReceiptEvent, xt as ContractEventFilterValue, yt as ContractEventFieldMetadata, z as ContractMethodDefinition, zt as ContractMethodEffect } from "./requestAirdrop-T1eVn3l5.cjs";
|
|
2
|
-
import { n as
|
|
3
|
-
import { _ as decodeCalldata, a as BoundContractMethod, c as SignedToken, d as deriveContractAddress, f as hashContract, g as createContractCallDecoder, h as SpecDecodedCall, i as fixedBytes, l as isSignedToken, m as SpecDeclaredException, n as FixedBytes, o as ContractInstance, p as buildNamedCodecs, r as fixedArray, s as getContract, t as FixedArray, u as signedToken, v as encodeCalldata, y as resolveCodec } from "./index-BfYEEVHm.cjs";
|
|
2
|
+
import { _ as decodeCalldata, a as BoundContractMethod, b as ContractArtifactSpec, c as SignedToken, d as deriveContractAddress, f as hashContract, g as createContractCallDecoder, h as SpecDecodedCall, i as fixedBytes, l as isSignedToken, m as SpecDeclaredException, n as FixedBytes, o as ContractInstance, p as buildNamedCodecs, r as fixedArray, s as getContract, t as FixedArray, u as signedToken, v as encodeCalldata, x as readContractArtifactSpec, y as resolveCodec } from "./index-ozfbEuYI.cjs";
|
|
4
3
|
export { type BoundContractMethod, type ContractArgumentMetadata, type ContractArrayType, type ContractArtifactSpec, type ContractCall, type ContractCallOptions, type ContractCodec, type ContractCodecContext, type ContractEnumDef, type ContractEnumVariant, type ContractEvent, type ContractEventDefinition, type ContractEventFieldMetadata, type ContractEventFilterInput, type ContractEventFilterValue, type ContractEventReceiptOptions, type ContractEventTopicMetadata, type ContractException, type ContractExceptionMetadata, type ContractExceptionType, type ContractFailure, type ContractField, type ContractInstance, type ContractMethod, type ContractMethodDefinition, ContractMethodEffect, type ContractMethodInputs, type ContractReceipt, type ContractReceiptEvent, type ContractReceiptFailure, type ContractReceiptOutcome, type ContractSpec, type ContractSpecId, type ContractSpecInterface, type ContractSpecMethod, type ContractSpecString, type ContractStructDef, type ContractType, type ContractTypeDef, ContractTypeDefKind, ContractTypeKind, type ContractUnionCase, ContractUnionCaseKind, type ContractUnionCaseType, type ContractUnionDef, type ContractVectorType, type ContractView, type ContractViewFailure, type ContractViewOptions, type ContractViewOutcome, type ContractViewRequest, type ContractViewRequestOptions, type DecodedContractEvent, type FixedArray, type FixedBytes, type MethodArgs, type SignedToken, type SpecDeclaredException, type SpecDecodedCall, type SpecDecodedEvent, type UnknownContractException, buildNamedCodecs, bytesEqual, createContractCallDecoder, createContractCodecContext, createContractEventDecoder, decodeCalldata, defineContractEvent, defineContractMethod, deriveContractAddress, encodeCalldata, fixedArray, fixedBytes, formatSpecId, getContract, hashContract, isSignedToken, readContractArtifactSpec, resolveCodec, signedToken, specIdKey, topicRepresentation };
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { $t as ContractUnionDef, At as topicRepresentation, B as ContractMethodInputs, Bt as ContractSpec, Ct as ContractEventTopicMetadata, Dt as bytesEqual, Et as SpecDecodedEvent, F as ContractException, Ft as ContractEnumDef, G as ContractViewFailure, Gt as ContractStructDef, H as ContractReceiptFailure, Ht as ContractSpecInterface, I as ContractExceptionMetadata, It as ContractEnumVariant, J as ContractViewRequest, Jt as ContractTypeDefKind, K as ContractViewOptions, Kt as ContractType, L as ContractFailure, Lt as ContractExceptionType, M as ContractArgumentMetadata, Mt as ContractCodecContext, N as ContractCall, Nt as createContractCodecContext, Ot as createContractEventDecoder, P as ContractCallOptions, Pt as ContractArrayType, Q as defineContractMethod, Qt as ContractUnionCaseType, R as ContractMethod, Rt as ContractField, St as ContractEventReceiptOptions, Tt as DecodedContractEvent, U as ContractReceiptOutcome, Ut as ContractSpecMethod, V as ContractReceipt, Vt as ContractSpecId, W as ContractView, Wt as ContractSpecString, X as MethodArgs, Xt as ContractUnionCase, Y as ContractViewRequestOptions, Yt as ContractTypeKind, Z as UnknownContractException, Zt as ContractUnionCaseKind, _t as ContractEvent, bt as ContractEventFilterInput, en as ContractVectorType, jt as ContractCodec, kt as defineContractEvent, nn as specIdKey, q as ContractViewOutcome, qt as ContractTypeDef, tn as formatSpecId, vt as ContractEventDefinition, wt as ContractReceiptEvent, xt as ContractEventFilterValue, yt as ContractEventFieldMetadata, z as ContractMethodDefinition, zt as ContractMethodEffect } from "./requestAirdrop-DBCOST2B.js";
|
|
2
|
-
import { n as
|
|
3
|
-
import { _ as decodeCalldata, a as BoundContractMethod, c as SignedToken, d as deriveContractAddress, f as hashContract, g as createContractCallDecoder, h as SpecDecodedCall, i as fixedBytes, l as isSignedToken, m as SpecDeclaredException, n as FixedBytes, o as ContractInstance, p as buildNamedCodecs, r as fixedArray, s as getContract, t as FixedArray, u as signedToken, v as encodeCalldata, y as resolveCodec } from "./index-Btl_jMCT.js";
|
|
2
|
+
import { _ as decodeCalldata, a as BoundContractMethod, b as ContractArtifactSpec, c as SignedToken, d as deriveContractAddress, f as hashContract, g as createContractCallDecoder, h as SpecDecodedCall, i as fixedBytes, l as isSignedToken, m as SpecDeclaredException, n as FixedBytes, o as ContractInstance, p as buildNamedCodecs, r as fixedArray, s as getContract, t as FixedArray, u as signedToken, v as encodeCalldata, x as readContractArtifactSpec, y as resolveCodec } from "./index-BmOG68Hd.js";
|
|
4
3
|
export { type BoundContractMethod, type ContractArgumentMetadata, type ContractArrayType, type ContractArtifactSpec, type ContractCall, type ContractCallOptions, type ContractCodec, type ContractCodecContext, type ContractEnumDef, type ContractEnumVariant, type ContractEvent, type ContractEventDefinition, type ContractEventFieldMetadata, type ContractEventFilterInput, type ContractEventFilterValue, type ContractEventReceiptOptions, type ContractEventTopicMetadata, type ContractException, type ContractExceptionMetadata, type ContractExceptionType, type ContractFailure, type ContractField, type ContractInstance, type ContractMethod, type ContractMethodDefinition, ContractMethodEffect, type ContractMethodInputs, type ContractReceipt, type ContractReceiptEvent, type ContractReceiptFailure, type ContractReceiptOutcome, type ContractSpec, type ContractSpecId, type ContractSpecInterface, type ContractSpecMethod, type ContractSpecString, type ContractStructDef, type ContractType, type ContractTypeDef, ContractTypeDefKind, ContractTypeKind, type ContractUnionCase, ContractUnionCaseKind, type ContractUnionCaseType, type ContractUnionDef, type ContractVectorType, type ContractView, type ContractViewFailure, type ContractViewOptions, type ContractViewOutcome, type ContractViewRequest, type ContractViewRequestOptions, type DecodedContractEvent, type FixedArray, type FixedBytes, type MethodArgs, type SignedToken, type SpecDeclaredException, type SpecDecodedCall, type SpecDecodedEvent, type UnknownContractException, buildNamedCodecs, bytesEqual, createContractCallDecoder, createContractCodecContext, createContractEventDecoder, decodeCalldata, defineContractEvent, defineContractMethod, deriveContractAddress, encodeCalldata, fixedArray, fixedBytes, formatSpecId, getContract, hashContract, isSignedToken, readContractArtifactSpec, resolveCodec, signedToken, specIdKey, topicRepresentation };
|
package/dist/contracts.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Bt as ContractSpec, F as ContractException, R as ContractMethod, Tt as DecodedContractEvent, _t as ContractEvent, xt as ContractEventFilterValue } from "./requestAirdrop-T1eVn3l5.cjs";
|
|
2
|
-
import { c as SignedToken, n as FixedBytes } from "./index-
|
|
3
|
-
import { n as
|
|
2
|
+
import { c as SignedToken, n as FixedBytes } from "./index-ozfbEuYI.cjs";
|
|
3
|
+
import { n as default_wallet, r as spec, t as DefaultWallet } from "./default_wallet-Dqs4_iTD.cjs";
|
|
4
|
+
import { n as spec$4, r as thruput_signed_op_if, t as SignedOp } from "./signed_op-DHb4n2JO.cjs";
|
|
4
5
|
import * as __gh_protocol from "@thruputchain/protocol";
|
|
5
6
|
|
|
6
7
|
//#region src/contracts/erc20.d.ts
|
|
@@ -101,7 +102,7 @@ declare namespace ERC20 {
|
|
|
101
102
|
kind: "declared";
|
|
102
103
|
name: "ERC20Error";
|
|
103
104
|
selector: 0xf63c8b1f5e7e2fe0n;
|
|
104
|
-
value: __gh_codegen$
|
|
105
|
+
value: __gh_codegen$1.thruput_erc20_if$v0_1$error$ERC20Error;
|
|
105
106
|
};
|
|
106
107
|
type Exception = ContractException<DeclaredException>;
|
|
107
108
|
}
|
|
@@ -193,92 +194,8 @@ declare function decodeEvent(__gh_event: {
|
|
|
193
194
|
topics: globalThis.Uint8Array[];
|
|
194
195
|
data: globalThis.Uint8Array;
|
|
195
196
|
}): ERC20Event | null;
|
|
196
|
-
declare namespace __gh_codegen$2 {
|
|
197
|
-
type thruput_erc20_if$v0_1$error$ERC20Error = thruput_erc20_if.v0_1.error.ERC20Error;
|
|
198
|
-
}
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region src/contracts/default_wallet.d.ts
|
|
201
|
-
declare namespace default_wallet {
|
|
202
|
-
namespace v0_1 {
|
|
203
|
-
namespace $interface {
|
|
204
|
-
interface WalletCall {
|
|
205
|
-
target: __gh_protocol.ContractAddress;
|
|
206
|
-
entrypoint: FixedBytes<8>;
|
|
207
|
-
gas_limit: bigint;
|
|
208
|
-
calldata: globalThis.Uint8Array;
|
|
209
|
-
tokens: __gh_codegen$1.default_wallet$v0_1$$interface$WalletTokenRef[];
|
|
210
|
-
}
|
|
211
|
-
type WalletError = 1n | 2n | 3n | 4n | 5n | 6n | 7n | 8n | 9n;
|
|
212
|
-
interface WalletInitCall {
|
|
213
|
-
entrypoint: FixedBytes<8>;
|
|
214
|
-
gas_limit: bigint;
|
|
215
|
-
calldata: globalThis.Uint8Array;
|
|
216
|
-
}
|
|
217
|
-
type WalletTokenRef = {
|
|
218
|
-
case: "Minted";
|
|
219
|
-
value: readonly [bigint];
|
|
220
|
-
} | {
|
|
221
|
-
case: "Returned";
|
|
222
|
-
value: {
|
|
223
|
-
call: bigint;
|
|
224
|
-
index: bigint;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
declare namespace DefaultWallet {
|
|
231
|
-
namespace v0_1 {
|
|
232
|
-
interface DeployArgs {
|
|
233
|
-
nonce: FixedBytes<32>;
|
|
234
|
-
contractHash: FixedBytes<32>;
|
|
235
|
-
amount: bigint;
|
|
236
|
-
initializer: __gh_codegen$1.default_wallet$v0_1$$interface$WalletInitCall | null;
|
|
237
|
-
}
|
|
238
|
-
type DeployResult = __gh_protocol.ContractAddress;
|
|
239
|
-
interface ExecuteArgs {
|
|
240
|
-
mints: globalThis.Uint8Array[];
|
|
241
|
-
calls: __gh_codegen$1.default_wallet$v0_1$$interface$WalletCall[];
|
|
242
|
-
}
|
|
243
|
-
type ExecuteResult = globalThis.Uint8Array[];
|
|
244
|
-
type DeclaredException = {
|
|
245
|
-
kind: "declared";
|
|
246
|
-
name: "WalletError";
|
|
247
|
-
selector: 0x931d3297d37d1bdfn;
|
|
248
|
-
value: __gh_codegen$1.default_wallet$v0_1$$interface$WalletError;
|
|
249
|
-
};
|
|
250
|
-
type Exception = ContractException<DeclaredException>;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
declare const spec: ContractSpec;
|
|
254
|
-
declare const DefaultWallet: {
|
|
255
|
-
readonly v0_1: {
|
|
256
|
-
readonly deploy: ContractMethod<DefaultWallet.v0_1.DeployArgs, __gh_protocol.ContractAddress, DefaultWallet.v0_1.DeclaredException>;
|
|
257
|
-
readonly execute: ContractMethod<DefaultWallet.v0_1.ExecuteArgs, DefaultWallet.v0_1.ExecuteResult, DefaultWallet.v0_1.DeclaredException>;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
declare const default_wallet: {
|
|
261
|
-
readonly v0_1: {
|
|
262
|
-
readonly $interface: {
|
|
263
|
-
readonly WalletError: {
|
|
264
|
-
readonly NotRootInvocation: 1n;
|
|
265
|
-
readonly InvalidAuthClaim: 2n;
|
|
266
|
-
readonly EmptyCallList: 3n;
|
|
267
|
-
readonly TooManyCalls: 4n;
|
|
268
|
-
readonly CallAborted: 5n;
|
|
269
|
-
readonly CallFaulted: 6n;
|
|
270
|
-
readonly ReturnDataTooLarge: 7n;
|
|
271
|
-
readonly InvalidTokenRef: 8n;
|
|
272
|
-
readonly TokenAlreadyForwarded: 9n;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
197
|
declare namespace __gh_codegen$1 {
|
|
278
|
-
type
|
|
279
|
-
type default_wallet$v0_1$$interface$WalletError = default_wallet.v0_1.$interface.WalletError;
|
|
280
|
-
type default_wallet$v0_1$$interface$WalletInitCall = default_wallet.v0_1.$interface.WalletInitCall;
|
|
281
|
-
type default_wallet$v0_1$$interface$WalletTokenRef = default_wallet.v0_1.$interface.WalletTokenRef;
|
|
198
|
+
type thruput_erc20_if$v0_1$error$ERC20Error = thruput_erc20_if.v0_1.error.ERC20Error;
|
|
282
199
|
}
|
|
283
200
|
//#endregion
|
|
284
201
|
//#region src/contracts/dev_wallet.d.ts
|
package/dist/contracts.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.cts","names":[],"sources":["../src/contracts/erc20.ts","../src/contracts/
|
|
1
|
+
{"version":3,"file":"contracts.d.cts","names":[],"sources":["../src/contracts/erc20.ts","../src/contracts/dev_wallet.ts","../src/contracts/erc20_permit.ts"],"mappings":";;;;;;;kBAmEiB,gBAAA;EAAA,UACE,IAAA;IAAA,UACE,KAAA;MAAA,KACH,UAAA;IAAA;IAAA,UAGG,MAAA;MAAA,UACE,oBAAA,SAA6B,oBAAA;QAG1C,KAAA,EAAO,aAAA,CAAc,eAAA;QACrB,OAAA,EAAS,aAAA,CAAc,eAAA;MAAA;QAEvB,UAAA;MAAA;MAAA,UAGa,0BAAA;QACf,KAAA,GAAQ,wBAAA,CAA8C,aAAA,CAAc,eAAA;QACpE,OAAA,GAAU,wBAAA,CAA8C,aAAA,CAAc,eAAA;MAAA;MAAA,UAGvD,oBAAA,SAA6B,oBAAA;QAG1C,KAAA,EAAO,aAAA,CAAc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,WAAA;EAAA,UACE,IAAA;IAAA,UACE,yBAAA;MACf,KAAA,EAAO,WAAA,CAAiC,YAAA,CAAa,iDAAA;IAAA;IAAA,KAE3C,2BAAA;IAAA,UAEK,2BAAA;MACf,KAAA,EAAO,WAAA,CAAiC,YAAA,CAAa,wCAAA;IAAA;IAAA,KAE3C,6BAAA;IAAA,UAEK,sBAAA;MACf,KAAA,EAAO,WAAA,CAAiC,YAAA,CAAa,wCAAA;MACrD,QAAA,EAAU,aAAA,CAAc,eAAA;MACxB,MAAA;IAAA;IAAA,KAEU,wBAAA;IAAA,KAEA,iBAAA;MAEN,IAAA;MACA,IAAA;MACA,QAAA;MACA,KAAA,EAAO,YAAA,CAAa,mDAAA;IAAA;MAGpB,IAAA;MACA,IAAA;MACA,QAAA;MACA,KAAA,EAAO,YAAA,CAAa,sCAAA;IAAA;IAAA,KAEd,SAAA,GACV,iBAAA,CAAuC,iBAAA;EAAA;AAAA;AAAA,cAIhC,MAAA,EAAM,YA8LlB;AAAA,cAMY,WAAA;EAAA;;;;;;cAkHA,kBAAA;EAAA;;;;;;;;;;;;;cAeA,uBAAA;EAAA;;;;;;;;;kBAYI,YAAA;EAAA,KACH,sCAAA,GACV,kBAAA,CAAiB,IAAA,CAAK,KAAA,CAAM,UAAA;EAAA,KAClB,iDAAA,GACV,uBAAA,CAAwB,IAAA,CAAK,oBAAA;EAAA,KACnB,wCAAA,GACV,uBAAA,CAAwB,IAAA,CAAK,WAAA;EAAA,KACnB,mDAAA,GACV,uBAAA,CAAwB,IAAA,CAAK,KAAA,CAAM,gBAAA;AAAA"}
|
package/dist/contracts.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Bt as ContractSpec, F as ContractException, R as ContractMethod, Tt as DecodedContractEvent, _t as ContractEvent, xt as ContractEventFilterValue } from "./requestAirdrop-DBCOST2B.js";
|
|
2
|
-
import { c as SignedToken, n as FixedBytes } from "./index-
|
|
3
|
-
import { n as
|
|
2
|
+
import { c as SignedToken, n as FixedBytes } from "./index-BmOG68Hd.js";
|
|
3
|
+
import { n as default_wallet, r as spec, t as DefaultWallet } from "./default_wallet-DkqsCa5C.js";
|
|
4
|
+
import { n as spec$4, r as thruput_signed_op_if, t as SignedOp } from "./signed_op-Dfa8WD0j.js";
|
|
4
5
|
import * as __gh_protocol from "@thruputchain/protocol";
|
|
5
6
|
|
|
6
7
|
//#region src/contracts/erc20.d.ts
|
|
@@ -101,7 +102,7 @@ declare namespace ERC20 {
|
|
|
101
102
|
kind: "declared";
|
|
102
103
|
name: "ERC20Error";
|
|
103
104
|
selector: 0xf63c8b1f5e7e2fe0n;
|
|
104
|
-
value: __gh_codegen$
|
|
105
|
+
value: __gh_codegen$1.thruput_erc20_if$v0_1$error$ERC20Error;
|
|
105
106
|
};
|
|
106
107
|
type Exception = ContractException<DeclaredException>;
|
|
107
108
|
}
|
|
@@ -193,92 +194,8 @@ declare function decodeEvent(__gh_event: {
|
|
|
193
194
|
topics: globalThis.Uint8Array[];
|
|
194
195
|
data: globalThis.Uint8Array;
|
|
195
196
|
}): ERC20Event | null;
|
|
196
|
-
declare namespace __gh_codegen$2 {
|
|
197
|
-
type thruput_erc20_if$v0_1$error$ERC20Error = thruput_erc20_if.v0_1.error.ERC20Error;
|
|
198
|
-
}
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region src/contracts/default_wallet.d.ts
|
|
201
|
-
declare namespace default_wallet {
|
|
202
|
-
namespace v0_1 {
|
|
203
|
-
namespace $interface {
|
|
204
|
-
interface WalletCall {
|
|
205
|
-
target: __gh_protocol.ContractAddress;
|
|
206
|
-
entrypoint: FixedBytes<8>;
|
|
207
|
-
gas_limit: bigint;
|
|
208
|
-
calldata: globalThis.Uint8Array;
|
|
209
|
-
tokens: __gh_codegen$1.default_wallet$v0_1$$interface$WalletTokenRef[];
|
|
210
|
-
}
|
|
211
|
-
type WalletError = 1n | 2n | 3n | 4n | 5n | 6n | 7n | 8n | 9n;
|
|
212
|
-
interface WalletInitCall {
|
|
213
|
-
entrypoint: FixedBytes<8>;
|
|
214
|
-
gas_limit: bigint;
|
|
215
|
-
calldata: globalThis.Uint8Array;
|
|
216
|
-
}
|
|
217
|
-
type WalletTokenRef = {
|
|
218
|
-
case: "Minted";
|
|
219
|
-
value: readonly [bigint];
|
|
220
|
-
} | {
|
|
221
|
-
case: "Returned";
|
|
222
|
-
value: {
|
|
223
|
-
call: bigint;
|
|
224
|
-
index: bigint;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
declare namespace DefaultWallet {
|
|
231
|
-
namespace v0_1 {
|
|
232
|
-
interface DeployArgs {
|
|
233
|
-
nonce: FixedBytes<32>;
|
|
234
|
-
contractHash: FixedBytes<32>;
|
|
235
|
-
amount: bigint;
|
|
236
|
-
initializer: __gh_codegen$1.default_wallet$v0_1$$interface$WalletInitCall | null;
|
|
237
|
-
}
|
|
238
|
-
type DeployResult = __gh_protocol.ContractAddress;
|
|
239
|
-
interface ExecuteArgs {
|
|
240
|
-
mints: globalThis.Uint8Array[];
|
|
241
|
-
calls: __gh_codegen$1.default_wallet$v0_1$$interface$WalletCall[];
|
|
242
|
-
}
|
|
243
|
-
type ExecuteResult = globalThis.Uint8Array[];
|
|
244
|
-
type DeclaredException = {
|
|
245
|
-
kind: "declared";
|
|
246
|
-
name: "WalletError";
|
|
247
|
-
selector: 0x931d3297d37d1bdfn;
|
|
248
|
-
value: __gh_codegen$1.default_wallet$v0_1$$interface$WalletError;
|
|
249
|
-
};
|
|
250
|
-
type Exception = ContractException<DeclaredException>;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
declare const spec: ContractSpec;
|
|
254
|
-
declare const DefaultWallet: {
|
|
255
|
-
readonly v0_1: {
|
|
256
|
-
readonly deploy: ContractMethod<DefaultWallet.v0_1.DeployArgs, __gh_protocol.ContractAddress, DefaultWallet.v0_1.DeclaredException>;
|
|
257
|
-
readonly execute: ContractMethod<DefaultWallet.v0_1.ExecuteArgs, DefaultWallet.v0_1.ExecuteResult, DefaultWallet.v0_1.DeclaredException>;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
declare const default_wallet: {
|
|
261
|
-
readonly v0_1: {
|
|
262
|
-
readonly $interface: {
|
|
263
|
-
readonly WalletError: {
|
|
264
|
-
readonly NotRootInvocation: 1n;
|
|
265
|
-
readonly InvalidAuthClaim: 2n;
|
|
266
|
-
readonly EmptyCallList: 3n;
|
|
267
|
-
readonly TooManyCalls: 4n;
|
|
268
|
-
readonly CallAborted: 5n;
|
|
269
|
-
readonly CallFaulted: 6n;
|
|
270
|
-
readonly ReturnDataTooLarge: 7n;
|
|
271
|
-
readonly InvalidTokenRef: 8n;
|
|
272
|
-
readonly TokenAlreadyForwarded: 9n;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
197
|
declare namespace __gh_codegen$1 {
|
|
278
|
-
type
|
|
279
|
-
type default_wallet$v0_1$$interface$WalletError = default_wallet.v0_1.$interface.WalletError;
|
|
280
|
-
type default_wallet$v0_1$$interface$WalletInitCall = default_wallet.v0_1.$interface.WalletInitCall;
|
|
281
|
-
type default_wallet$v0_1$$interface$WalletTokenRef = default_wallet.v0_1.$interface.WalletTokenRef;
|
|
198
|
+
type thruput_erc20_if$v0_1$error$ERC20Error = thruput_erc20_if.v0_1.error.ERC20Error;
|
|
282
199
|
}
|
|
283
200
|
//#endregion
|
|
284
201
|
//#region src/contracts/dev_wallet.d.ts
|
package/dist/contracts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","names":[],"sources":["../src/contracts/erc20.ts","../src/contracts/
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","names":[],"sources":["../src/contracts/erc20.ts","../src/contracts/dev_wallet.ts","../src/contracts/erc20_permit.ts"],"mappings":";;;;;;;kBAmEiB,gBAAA;EAAA,UACE,IAAA;IAAA,UAC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,wCAAA,GACV,uBAAA,CAAwB,IAAA,CAAK,WAAA;EAAA,KACnB,mDAAA,GACV,uBAAA,CAAwB,IAAA,CAAK,KAAA,CAAM,gBAAA;AAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Bt as ContractSpec, F as ContractException, R as ContractMethod } from "./requestAirdrop-DBCOST2B.js";
|
|
2
|
+
import { n as FixedBytes } from "./index-BmOG68Hd.js";
|
|
3
|
+
import * as __gh_protocol from "@thruputchain/protocol";
|
|
4
|
+
|
|
5
|
+
//#region src/contracts/default_wallet.d.ts
|
|
6
|
+
declare namespace default_wallet {
|
|
7
|
+
namespace v0_1 {
|
|
8
|
+
namespace $interface {
|
|
9
|
+
interface WalletCall {
|
|
10
|
+
target: __gh_protocol.ContractAddress;
|
|
11
|
+
entrypoint: FixedBytes<8>;
|
|
12
|
+
gas_limit: bigint;
|
|
13
|
+
calldata: globalThis.Uint8Array;
|
|
14
|
+
tokens: __gh_codegen.default_wallet$v0_1$$interface$WalletTokenRef[];
|
|
15
|
+
}
|
|
16
|
+
type WalletError = 1n | 2n | 3n | 4n | 5n | 6n | 7n | 8n | 9n;
|
|
17
|
+
interface WalletInitCall {
|
|
18
|
+
entrypoint: FixedBytes<8>;
|
|
19
|
+
gas_limit: bigint;
|
|
20
|
+
calldata: globalThis.Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
type WalletTokenRef = {
|
|
23
|
+
case: "Minted";
|
|
24
|
+
value: readonly [bigint];
|
|
25
|
+
} | {
|
|
26
|
+
case: "Returned";
|
|
27
|
+
value: {
|
|
28
|
+
call: bigint;
|
|
29
|
+
index: bigint;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
declare namespace DefaultWallet {
|
|
36
|
+
namespace v0_1 {
|
|
37
|
+
interface DeployArgs {
|
|
38
|
+
nonce: FixedBytes<32>;
|
|
39
|
+
contractHash: FixedBytes<32>;
|
|
40
|
+
amount: bigint;
|
|
41
|
+
initializer: __gh_codegen.default_wallet$v0_1$$interface$WalletInitCall | null;
|
|
42
|
+
}
|
|
43
|
+
type DeployResult = __gh_protocol.ContractAddress;
|
|
44
|
+
interface ExecuteArgs {
|
|
45
|
+
mints: globalThis.Uint8Array[];
|
|
46
|
+
calls: __gh_codegen.default_wallet$v0_1$$interface$WalletCall[];
|
|
47
|
+
}
|
|
48
|
+
type ExecuteResult = globalThis.Uint8Array[];
|
|
49
|
+
type DeclaredException = {
|
|
50
|
+
kind: "declared";
|
|
51
|
+
name: "WalletError";
|
|
52
|
+
selector: 0x931d3297d37d1bdfn;
|
|
53
|
+
value: __gh_codegen.default_wallet$v0_1$$interface$WalletError;
|
|
54
|
+
};
|
|
55
|
+
type Exception = ContractException<DeclaredException>;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
declare const spec: ContractSpec;
|
|
59
|
+
declare const DefaultWallet: {
|
|
60
|
+
readonly v0_1: {
|
|
61
|
+
readonly deploy: ContractMethod<DefaultWallet.v0_1.DeployArgs, __gh_protocol.ContractAddress, DefaultWallet.v0_1.DeclaredException>;
|
|
62
|
+
readonly execute: ContractMethod<DefaultWallet.v0_1.ExecuteArgs, DefaultWallet.v0_1.ExecuteResult, DefaultWallet.v0_1.DeclaredException>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
declare const default_wallet: {
|
|
66
|
+
readonly v0_1: {
|
|
67
|
+
readonly $interface: {
|
|
68
|
+
readonly WalletError: {
|
|
69
|
+
readonly NotRootInvocation: 1n;
|
|
70
|
+
readonly InvalidAuthClaim: 2n;
|
|
71
|
+
readonly EmptyCallList: 3n;
|
|
72
|
+
readonly TooManyCalls: 4n;
|
|
73
|
+
readonly CallAborted: 5n;
|
|
74
|
+
readonly CallFaulted: 6n;
|
|
75
|
+
readonly ReturnDataTooLarge: 7n;
|
|
76
|
+
readonly InvalidTokenRef: 8n;
|
|
77
|
+
readonly TokenAlreadyForwarded: 9n;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
declare namespace __gh_codegen {
|
|
83
|
+
type default_wallet$v0_1$$interface$WalletCall = default_wallet.v0_1.$interface.WalletCall;
|
|
84
|
+
type default_wallet$v0_1$$interface$WalletError = default_wallet.v0_1.$interface.WalletError;
|
|
85
|
+
type default_wallet$v0_1$$interface$WalletInitCall = default_wallet.v0_1.$interface.WalletInitCall;
|
|
86
|
+
type default_wallet$v0_1$$interface$WalletTokenRef = default_wallet.v0_1.$interface.WalletTokenRef;
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { default_wallet as n, spec as r, DefaultWallet as t };
|
|
90
|
+
//# sourceMappingURL=default_wallet-DkqsCa5C.d.ts.map
|