@bounded-sh/core 0.0.117 → 0.0.118
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/dist/client/reconcile.d.ts +2 -2
- package/dist/client/solana-confirm.d.ts +49 -0
- package/dist/client/solana-operations.d.ts +7 -1
- package/dist/{index-C6ZW5Gt2.mjs → index-BXfRRAUZ.mjs} +84 -28
- package/dist/index-BXfRRAUZ.mjs.map +1 -0
- package/dist/{index-DQ0FXeI8.js → index-l9LI3y1q.js} +84 -27
- package/dist/index-l9LI3y1q.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{mirror-sync-ChzMq7bH.js → mirror-sync-DJVm0KKu.js} +2 -2
- package/dist/{mirror-sync-ChzMq7bH.js.map → mirror-sync-DJVm0KKu.js.map} +1 -1
- package/dist/{mirror-sync-kt9PzQen.mjs → mirror-sync-DoH9ewTo.mjs} +2 -2
- package/dist/{mirror-sync-kt9PzQen.mjs.map → mirror-sync-DoH9ewTo.mjs.map} +1 -1
- package/dist/{realtime-store-FUjGL_Z8.mjs → realtime-store-BreUReSo.mjs} +2 -2
- package/dist/{realtime-store-FUjGL_Z8.mjs.map → realtime-store-BreUReSo.mjs.map} +1 -1
- package/dist/{realtime-store-CURbZ68v.js → realtime-store-kZMPgwVB.js} +2 -2
- package/dist/{realtime-store-CURbZ68v.js.map → realtime-store-kZMPgwVB.js.map} +1 -1
- package/dist/{solana-message-CEjXjnaG.mjs → solana-message-CjI0h27k.mjs} +2 -2
- package/dist/{solana-message-CEjXjnaG.mjs.map → solana-message-CjI0h27k.mjs.map} +1 -1
- package/dist/{solana-message-F1e5wPKF.js → solana-message-HkOoUz8z.js} +2 -2
- package/dist/{solana-message-F1e5wPKF.js.map → solana-message-HkOoUz8z.js.map} +1 -1
- package/dist/{solana-operations-5WjFwhnt.mjs → solana-operations-CD6pks4-.mjs} +32 -30
- package/dist/solana-operations-CD6pks4-.mjs.map +1 -0
- package/dist/{solana-operations-CI0sREvl.js → solana-operations-DFohVGz6.js} +32 -29
- package/dist/solana-operations-DFohVGz6.js.map +1 -0
- package/dist/{solana-v1-operations-oot2R63I.js → solana-v1-operations-bhDjo-5U.js} +10 -24
- package/dist/solana-v1-operations-bhDjo-5U.js.map +1 -0
- package/dist/{solana-v1-operations-DB9pih7o.mjs → solana-v1-operations-ewIzFDeY.mjs} +10 -24
- package/dist/solana-v1-operations-ewIzFDeY.mjs.map +1 -0
- package/dist/types.d.ts +8 -15
- package/package.json +1 -1
- package/dist/index-C6ZW5Gt2.mjs.map +0 -1
- package/dist/index-DQ0FXeI8.js.map +0 -1
- package/dist/solana-operations-5WjFwhnt.mjs.map +0 -1
- package/dist/solana-operations-CI0sREvl.js.map +0 -1
- package/dist/solana-v1-operations-DB9pih7o.mjs.map +0 -1
- package/dist/solana-v1-operations-oot2R63I.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var solanaOperations = require('./solana-operations-
|
|
3
|
+
var index = require('./index-l9LI3y1q.js');
|
|
4
|
+
var solanaOperations = require('./solana-operations-DFohVGz6.js');
|
|
5
5
|
require('axios');
|
|
6
6
|
require('tweetnacl');
|
|
7
7
|
require('reconnecting-websocket');
|
|
@@ -88,7 +88,7 @@ async function refreshLifetime(transaction, compiledMessage, kit, rpc, serverFen
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
async function handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent, beforeBroadcast) {
|
|
91
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
91
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
92
92
|
const config = (_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a._config) !== null && _b !== void 0 ? _b : await index.getConfig();
|
|
93
93
|
const decoded = await decodeAndValidate(tx.serializedTransaction, {
|
|
94
94
|
label: 'Pre-built v1 transaction', expectedAppId: config.appId, expectedIntent,
|
|
@@ -143,34 +143,20 @@ async function handlePreBuiltV1Transaction(tx, authProvider, options, expectedIn
|
|
|
143
143
|
reason: `Broadcast response was lost or inconclusive: ${solanaOperations.errorText(error)}`,
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
confirmation = await submitRpc.confirmTransaction({ signature, blockhash: refreshed.fence.blockhash, lastValidBlockHeight: refreshed.fence.lastValidBlockHeight }, 'confirmed');
|
|
149
|
-
}
|
|
150
|
-
catch (error) {
|
|
146
|
+
const confirmation = await index.confirmSignature(submitRpc, { signature, lastValidBlockHeight: refreshed.fence.lastValidBlockHeight });
|
|
147
|
+
if (!confirmation.landed) {
|
|
151
148
|
return {
|
|
152
149
|
outcome: 'submitted', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,
|
|
153
|
-
reason: `Confirmation outcome unknown: ${
|
|
150
|
+
reason: `Confirmation outcome unknown: ${confirmation.reason}`,
|
|
154
151
|
};
|
|
155
152
|
}
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
try {
|
|
159
|
-
logMessages = (_h = (_g = (await solanaOperations.getTransactionJson(submitRpc, signature, 'confirmed'))) === null || _g === void 0 ? void 0 : _g.meta) === null || _h === void 0 ? void 0 : _h.logMessages;
|
|
160
|
-
}
|
|
161
|
-
catch (_l) {
|
|
162
|
-
// Diagnostic only; the on-chain error is the verdict.
|
|
163
|
-
}
|
|
164
|
-
if (solanaOperations.isBoundedOnchainRuleRejection(confirmation.value.err, logMessages)) {
|
|
165
|
-
throw index.markWriteNotApplied(new solanaOperations.BoundedOnchainRuleRejection(confirmation.value.err, logMessages), 'failed_onchain');
|
|
166
|
-
}
|
|
167
|
-
throw index.markWriteNotApplied(new Error(`Transaction failed: ${logMessages ? JSON.stringify(logMessages) : JSON.stringify(confirmation.value.err)}`), 'failed_onchain');
|
|
168
|
-
}
|
|
153
|
+
if (confirmation.status.err)
|
|
154
|
+
throw await solanaOperations.landedTransactionFailure(submitRpc, signature, confirmation.status.err);
|
|
169
155
|
return {
|
|
170
156
|
outcome: 'confirmed', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,
|
|
171
|
-
confirmationContextSlot: (
|
|
157
|
+
confirmationContextSlot: (_g = (_f = confirmation.status.slot) !== null && _f !== void 0 ? _f : confirmation.contextSlot) !== null && _g !== void 0 ? _g : 0,
|
|
172
158
|
};
|
|
173
159
|
}
|
|
174
160
|
|
|
175
161
|
exports.handlePreBuiltV1Transaction = handlePreBuiltV1Transaction;
|
|
176
|
-
//# sourceMappingURL=solana-v1-operations-
|
|
162
|
+
//# sourceMappingURL=solana-v1-operations-bhDjo-5U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana-v1-operations-bhDjo-5U.js","sources":["../.rollup-tmp/client/solana-v1-operations.js"],"sourcesContent":["// solana-v1-operations.ts - the SIMD-0385 v1 half of the pre-built write lane.\n//\n// The realtime worker hands the SDK a serialized, possibly partially-signed\n// transaction (sponsor and attestation signatures may already be attached). For\n// v1 wires (first byte 0x81) @solana/web3.js's legacy/v0 classes cannot even\n// deserialize the bytes, so this lane decodes with @solana/kit, runs the SAME\n// semantic validation the v0 lane runs (program allow-list, setup-shape\n// recomputation, OA-0001 intent binding), refreshes the lifetime only while the\n// transaction is still unsigned, signs through the provider's `signTransactionV1`,\n// and submits base64 over the same RPC handle the v0 lane uses.\n//\n// Lazy-loaded: `@solana/kit` must never enter the SDK's initial chunk.\nimport { Buffer } from 'buffer';\nimport { getConfig } from './config';\nimport { markWriteNotApplied } from './write-outcome';\nimport { BoundedOnchainRuleRejection, decodeBase58, encodeBase58, errorText, isBoundedOnchainRuleRejection, isDefinitiveSolanaSendFailure, landedTransactionFailure, validateServerTransactionSemantics, } from './solana-operations';\nimport { confirmSignature } from './solana-confirm';\nfunction transactionHasSignature(transaction) {\n return Object.values(transaction.signatures).some((sig) => !!sig && sig.some((byte) => byte !== 0));\n}\nfunction sameBytes(a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i += 1)\n if (a[i] !== b[i])\n return false;\n return true;\n}\nasync function decodeAndValidate(serializedTransaction, options) {\n const kit = await import('@solana/kit');\n const transaction = kit.getTransactionDecoder().decode(Buffer.from(serializedTransaction, 'base64'));\n const compiledMessage = kit.getCompiledTransactionMessageDecoder().decode(transaction.messageBytes);\n if (compiledMessage.version !== 1) {\n throw new Error(`${options.label} announced SIMD-0385 v1 but decoded as version ${String(compiledMessage.version)}`);\n }\n if (compiledMessage.instructionHeaders.length !== compiledMessage.instructionPayloads.length) {\n throw new Error(`${options.label} has mismatched v1 instruction headers and payloads`);\n }\n const { PublicKey } = await import('@solana/web3.js');\n const accountKeys = compiledMessage.staticAccounts.map((key) => new PublicKey(key));\n const instructions = compiledMessage.instructionHeaders.map((header, index) => {\n if (header.programAccountIndex >= accountKeys.length)\n throw new Error(`${options.label} has an invalid program account index`);\n const payload = compiledMessage.instructionPayloads[index];\n return {\n programId: accountKeys[header.programAccountIndex].toBase58(),\n accountKeyIndexes: [...payload.instructionAccountIndices],\n data: Uint8Array.from(payload.instructionData),\n };\n });\n validateServerTransactionSemantics(Object.assign(Object.assign({}, options), { accountKeys, isAccountSigner: (index) => index >= 0 && index < compiledMessage.header.numSignerAccounts, instructions, PublicKeyCtor: PublicKey }));\n return { transaction, compiledMessage, kit };\n}\n/**\n * LF-003 parity with the v0 lane: an UNSIGNED transaction is re-based on a live\n * blockhash before the wallet signs it; a transaction that already carries a\n * co-signer's signature must keep the exact message it was co-signed against,\n * and its fence must name that same blockhash.\n */\nasync function refreshLifetime(transaction, compiledMessage, kit, rpc, serverFence) {\n var _a;\n const fence = { blockhash: serverFence.blockhash, lastValidBlockHeight: serverFence.lastValidBlockHeight };\n if (transactionHasSignature(transaction)) {\n if (String(compiledMessage.lifetimeToken) !== fence.blockhash) {\n throw new Error(`The pre-built v1 transaction was co-signed against blockhash ${String(compiledMessage.lifetimeToken)} ` +\n `but its expiry fence names ${fence.blockhash}. Nothing was signed.`);\n }\n return { transaction, fence };\n }\n if (!rpc)\n return { transaction, fence };\n if (typeof rpc.getLatestBlockhash !== 'function') {\n throw new Error('Pre-built v1 signing needs a current blockhash, but the configured Solana RPC cannot report one. Nothing was signed.');\n }\n const latest = await rpc.getLatestBlockhash('confirmed');\n const decoded = decodeBase58(String((_a = latest === null || latest === void 0 ? void 0 : latest.blockhash) !== null && _a !== void 0 ? _a : ''));\n if (decoded === null || decoded.length !== 32) {\n throw new Error(`The configured Solana RPC returned \"${latest === null || latest === void 0 ? void 0 : latest.blockhash}\" as the current blockhash, which is not a 32-byte base58 value. Nothing was signed.`);\n }\n const decompiled = kit.decompileTransactionMessage(compiledMessage, { lastValidBlockHeight: BigInt(serverFence.lastValidBlockHeight) });\n const refreshed = kit.setTransactionMessageLifetimeUsingBlockhash({ blockhash: kit.blockhash(latest.blockhash), lastValidBlockHeight: BigInt(latest.lastValidBlockHeight) }, decompiled);\n return {\n transaction: kit.compileTransaction(refreshed),\n fence: { blockhash: latest.blockhash, lastValidBlockHeight: latest.lastValidBlockHeight },\n };\n}\nexport async function handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent, beforeBroadcast) {\n var _a, _b, _c, _d, _e, _f, _g;\n const config = (_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a._config) !== null && _b !== void 0 ? _b : await getConfig();\n const decoded = await decodeAndValidate(tx.serializedTransaction, {\n label: 'Pre-built v1 transaction', expectedAppId: config.appId, expectedIntent,\n });\n if (typeof authProvider.signTransactionV1 !== 'function') {\n // The worker only builds v1 for a client that advertised it; reaching this\n // means the provider changed underneath the write. Refuse before any RPC.\n throw new Error('The write came back as a Solana transaction v1 (SIMD-0385) but this auth provider cannot sign v1. Nothing was signed.');\n }\n const shouldSubmit = (options === null || options === void 0 ? void 0 : options.shouldSubmitTx) !== false;\n const rpcUrl = (_c = config.rpcUrl) === null || _c === void 0 ? void 0 : _c.trim();\n const injectedRpc = (_d = options === null || options === void 0 ? void 0 : options._overrides) === null || _d === void 0 ? void 0 : _d._solanaRpc;\n if (shouldSubmit && !rpcUrl && !injectedRpc) {\n throw new Error(`Pre-built Solana transaction submission requires init({ rpcUrl }) for ${tx.network}. ` +\n `Pass a TOP-LEVEL rpcUrl (with chain) to init(), e.g. ` +\n `init({ appId, chain: '${tx.network}', rpcUrl: '<your ${tx.network} RPC endpoint>' }); ` +\n `a nested walletLogin.rpcUrl only configures wallet login and does not enable submission.`);\n }\n const { Connection } = await import('@solana/web3.js');\n const connection = injectedRpc !== null && injectedRpc !== void 0 ? injectedRpc : (rpcUrl ? new Connection(rpcUrl, 'confirmed') : null);\n const refreshed = await refreshLifetime(decoded.transaction, decoded.compiledMessage, decoded.kit, connection, tx);\n const signedTx = await authProvider.signTransactionV1(refreshed.transaction);\n if (!sameBytes(signedTx.messageBytes, refreshed.transaction.messageBytes)) {\n throw new Error('The signer changed the v1 transaction message instead of signing the exact transaction. Nothing was submitted.');\n }\n const feePayerAddress = String((_e = decoded.compiledMessage.staticAccounts[0]) !== null && _e !== void 0 ? _e : '');\n const feePayerSignature = signedTx.signatures[feePayerAddress];\n const rawTx = Uint8Array.from(decoded.kit.getTransactionEncoder().encode(signedTx));\n const signedTransaction = Buffer.from(rawTx).toString('base64');\n if (!shouldSubmit) {\n return { outcome: 'signed', lane: 'solana', transactionSignature: null, signedTransaction, fence: refreshed.fence };\n }\n if (!feePayerSignature || feePayerSignature.every((byte) => byte === 0)) {\n throw new Error('The signed v1 transaction carries no fee-payer signature; it cannot be submitted.');\n }\n // The transaction id is the fee payer's signature, derived from the signed bytes\n // BEFORE broadcasting so a lost send response still yields a reconcilable id.\n const signature = encodeBase58(Uint8Array.from(feePayerSignature));\n const submitRpc = connection;\n await (beforeBroadcast === null || beforeBroadcast === void 0 ? void 0 : beforeBroadcast({ transactionSignature: signature, signedTransaction, fence: refreshed.fence }));\n try {\n await submitRpc.sendRawTransaction(rawTx, { skipPreflight: false, maxRetries: 3 });\n }\n catch (error) {\n if (isDefinitiveSolanaSendFailure(error)) {\n if (isBoundedOnchainRuleRejection(error))\n throw markWriteNotApplied(new BoundedOnchainRuleRejection(error), 'broadcast_rejected');\n throw markWriteNotApplied(error, 'broadcast_rejected');\n }\n return {\n outcome: 'submitted', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,\n reason: `Broadcast response was lost or inconclusive: ${errorText(error)}`,\n };\n }\n const confirmation = await confirmSignature(submitRpc, { signature, lastValidBlockHeight: refreshed.fence.lastValidBlockHeight });\n if (!confirmation.landed) {\n return {\n outcome: 'submitted', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,\n reason: `Confirmation outcome unknown: ${confirmation.reason}`,\n };\n }\n if (confirmation.status.err)\n throw await landedTransactionFailure(submitRpc, signature, confirmation.status.err);\n return {\n outcome: 'confirmed', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,\n confirmationContextSlot: (_g = (_f = confirmation.status.slot) !== null && _f !== void 0 ? _f : confirmation.contextSlot) !== null && _g !== void 0 ? _g : 0,\n };\n}\n"],"names":["Buffer","validateServerTransactionSemantics","decodeBase58","getConfig","encodeBase58","isDefinitiveSolanaSendFailure","isBoundedOnchainRuleRejection","markWriteNotApplied","BoundedOnchainRuleRejection","errorText","confirmSignature","landedTransactionFailure"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAAS,uBAAuB,CAAC,WAAW,EAAE;AAC9C,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;AACvG;AAC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iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK;AAC5H,YAAY,MAAM,EAAE,CAAC,8BAA8B,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAC1E,SAAS;AACT,IAAI;AACJ,IAAI,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG;AAC/B,QAAQ,MAAM,MAAMC,yCAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;AAC3F,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK;AACxH,QAAQ,uBAAuB,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,YAAY,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,CAAC;AACpK,KAAK;AACL;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getConfig, b as bufferExports, a as markWriteNotApplied } from './index-
|
|
2
|
-
import { encodeBase58, isDefinitiveSolanaSendFailure, isBoundedOnchainRuleRejection, BoundedOnchainRuleRejection, errorText,
|
|
1
|
+
import { g as getConfig, b as bufferExports, a as markWriteNotApplied, c as confirmSignature } from './index-BXfRRAUZ.mjs';
|
|
2
|
+
import { encodeBase58, isDefinitiveSolanaSendFailure, isBoundedOnchainRuleRejection, BoundedOnchainRuleRejection, errorText, landedTransactionFailure, validateServerTransactionSemantics, decodeBase58 } from './solana-operations-CD6pks4-.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'tweetnacl';
|
|
5
5
|
import 'reconnecting-websocket';
|
|
@@ -86,7 +86,7 @@ async function refreshLifetime(transaction, compiledMessage, kit, rpc, serverFen
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
async function handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent, beforeBroadcast) {
|
|
89
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
89
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
90
90
|
const config = (_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a._config) !== null && _b !== void 0 ? _b : await getConfig();
|
|
91
91
|
const decoded = await decodeAndValidate(tx.serializedTransaction, {
|
|
92
92
|
label: 'Pre-built v1 transaction', expectedAppId: config.appId, expectedIntent,
|
|
@@ -141,34 +141,20 @@ async function handlePreBuiltV1Transaction(tx, authProvider, options, expectedIn
|
|
|
141
141
|
reason: `Broadcast response was lost or inconclusive: ${errorText(error)}`,
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
confirmation = await submitRpc.confirmTransaction({ signature, blockhash: refreshed.fence.blockhash, lastValidBlockHeight: refreshed.fence.lastValidBlockHeight }, 'confirmed');
|
|
147
|
-
}
|
|
148
|
-
catch (error) {
|
|
144
|
+
const confirmation = await confirmSignature(submitRpc, { signature, lastValidBlockHeight: refreshed.fence.lastValidBlockHeight });
|
|
145
|
+
if (!confirmation.landed) {
|
|
149
146
|
return {
|
|
150
147
|
outcome: 'submitted', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,
|
|
151
|
-
reason: `Confirmation outcome unknown: ${
|
|
148
|
+
reason: `Confirmation outcome unknown: ${confirmation.reason}`,
|
|
152
149
|
};
|
|
153
150
|
}
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
try {
|
|
157
|
-
logMessages = (_h = (_g = (await getTransactionJson(submitRpc, signature, 'confirmed'))) === null || _g === void 0 ? void 0 : _g.meta) === null || _h === void 0 ? void 0 : _h.logMessages;
|
|
158
|
-
}
|
|
159
|
-
catch (_l) {
|
|
160
|
-
// Diagnostic only; the on-chain error is the verdict.
|
|
161
|
-
}
|
|
162
|
-
if (isBoundedOnchainRuleRejection(confirmation.value.err, logMessages)) {
|
|
163
|
-
throw markWriteNotApplied(new BoundedOnchainRuleRejection(confirmation.value.err, logMessages), 'failed_onchain');
|
|
164
|
-
}
|
|
165
|
-
throw markWriteNotApplied(new Error(`Transaction failed: ${logMessages ? JSON.stringify(logMessages) : JSON.stringify(confirmation.value.err)}`), 'failed_onchain');
|
|
166
|
-
}
|
|
151
|
+
if (confirmation.status.err)
|
|
152
|
+
throw await landedTransactionFailure(submitRpc, signature, confirmation.status.err);
|
|
167
153
|
return {
|
|
168
154
|
outcome: 'confirmed', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,
|
|
169
|
-
confirmationContextSlot: (
|
|
155
|
+
confirmationContextSlot: (_g = (_f = confirmation.status.slot) !== null && _f !== void 0 ? _f : confirmation.contextSlot) !== null && _g !== void 0 ? _g : 0,
|
|
170
156
|
};
|
|
171
157
|
}
|
|
172
158
|
|
|
173
159
|
export { handlePreBuiltV1Transaction };
|
|
174
|
-
//# sourceMappingURL=solana-v1-operations-
|
|
160
|
+
//# sourceMappingURL=solana-v1-operations-ewIzFDeY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana-v1-operations-ewIzFDeY.mjs","sources":["../.rollup-tmp/client/solana-v1-operations.js"],"sourcesContent":["// solana-v1-operations.ts - the SIMD-0385 v1 half of the pre-built write lane.\n//\n// The realtime worker hands the SDK a serialized, possibly partially-signed\n// transaction (sponsor and attestation signatures may already be attached). For\n// v1 wires (first byte 0x81) @solana/web3.js's legacy/v0 classes cannot even\n// deserialize the bytes, so this lane decodes with @solana/kit, runs the SAME\n// semantic validation the v0 lane runs (program allow-list, setup-shape\n// recomputation, OA-0001 intent binding), refreshes the lifetime only while the\n// transaction is still unsigned, signs through the provider's `signTransactionV1`,\n// and submits base64 over the same RPC handle the v0 lane uses.\n//\n// Lazy-loaded: `@solana/kit` must never enter the SDK's initial chunk.\nimport { Buffer } from 'buffer';\nimport { getConfig } from './config';\nimport { markWriteNotApplied } from './write-outcome';\nimport { BoundedOnchainRuleRejection, decodeBase58, encodeBase58, errorText, isBoundedOnchainRuleRejection, isDefinitiveSolanaSendFailure, landedTransactionFailure, validateServerTransactionSemantics, } from './solana-operations';\nimport { confirmSignature } from './solana-confirm';\nfunction transactionHasSignature(transaction) {\n return Object.values(transaction.signatures).some((sig) => !!sig && sig.some((byte) => byte !== 0));\n}\nfunction sameBytes(a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i += 1)\n if (a[i] !== b[i])\n return false;\n return true;\n}\nasync function decodeAndValidate(serializedTransaction, options) {\n const kit = await import('@solana/kit');\n const transaction = kit.getTransactionDecoder().decode(Buffer.from(serializedTransaction, 'base64'));\n const compiledMessage = kit.getCompiledTransactionMessageDecoder().decode(transaction.messageBytes);\n if (compiledMessage.version !== 1) {\n throw new Error(`${options.label} announced SIMD-0385 v1 but decoded as version ${String(compiledMessage.version)}`);\n }\n if (compiledMessage.instructionHeaders.length !== compiledMessage.instructionPayloads.length) {\n throw new Error(`${options.label} has mismatched v1 instruction headers and payloads`);\n }\n const { PublicKey } = await import('@solana/web3.js');\n const accountKeys = compiledMessage.staticAccounts.map((key) => new PublicKey(key));\n const instructions = compiledMessage.instructionHeaders.map((header, index) => {\n if (header.programAccountIndex >= accountKeys.length)\n throw new Error(`${options.label} has an invalid program account index`);\n const payload = compiledMessage.instructionPayloads[index];\n return {\n programId: accountKeys[header.programAccountIndex].toBase58(),\n accountKeyIndexes: [...payload.instructionAccountIndices],\n data: Uint8Array.from(payload.instructionData),\n };\n });\n validateServerTransactionSemantics(Object.assign(Object.assign({}, options), { accountKeys, isAccountSigner: (index) => index >= 0 && index < compiledMessage.header.numSignerAccounts, instructions, PublicKeyCtor: PublicKey }));\n return { transaction, compiledMessage, kit };\n}\n/**\n * LF-003 parity with the v0 lane: an UNSIGNED transaction is re-based on a live\n * blockhash before the wallet signs it; a transaction that already carries a\n * co-signer's signature must keep the exact message it was co-signed against,\n * and its fence must name that same blockhash.\n */\nasync function refreshLifetime(transaction, compiledMessage, kit, rpc, serverFence) {\n var _a;\n const fence = { blockhash: serverFence.blockhash, lastValidBlockHeight: serverFence.lastValidBlockHeight };\n if (transactionHasSignature(transaction)) {\n if (String(compiledMessage.lifetimeToken) !== fence.blockhash) {\n throw new Error(`The pre-built v1 transaction was co-signed against blockhash ${String(compiledMessage.lifetimeToken)} ` +\n `but its expiry fence names ${fence.blockhash}. Nothing was signed.`);\n }\n return { transaction, fence };\n }\n if (!rpc)\n return { transaction, fence };\n if (typeof rpc.getLatestBlockhash !== 'function') {\n throw new Error('Pre-built v1 signing needs a current blockhash, but the configured Solana RPC cannot report one. Nothing was signed.');\n }\n const latest = await rpc.getLatestBlockhash('confirmed');\n const decoded = decodeBase58(String((_a = latest === null || latest === void 0 ? void 0 : latest.blockhash) !== null && _a !== void 0 ? _a : ''));\n if (decoded === null || decoded.length !== 32) {\n throw new Error(`The configured Solana RPC returned \"${latest === null || latest === void 0 ? void 0 : latest.blockhash}\" as the current blockhash, which is not a 32-byte base58 value. Nothing was signed.`);\n }\n const decompiled = kit.decompileTransactionMessage(compiledMessage, { lastValidBlockHeight: BigInt(serverFence.lastValidBlockHeight) });\n const refreshed = kit.setTransactionMessageLifetimeUsingBlockhash({ blockhash: kit.blockhash(latest.blockhash), lastValidBlockHeight: BigInt(latest.lastValidBlockHeight) }, decompiled);\n return {\n transaction: kit.compileTransaction(refreshed),\n fence: { blockhash: latest.blockhash, lastValidBlockHeight: latest.lastValidBlockHeight },\n };\n}\nexport async function handlePreBuiltV1Transaction(tx, authProvider, options, expectedIntent, beforeBroadcast) {\n var _a, _b, _c, _d, _e, _f, _g;\n const config = (_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a._config) !== null && _b !== void 0 ? _b : await getConfig();\n const decoded = await decodeAndValidate(tx.serializedTransaction, {\n label: 'Pre-built v1 transaction', expectedAppId: config.appId, expectedIntent,\n });\n if (typeof authProvider.signTransactionV1 !== 'function') {\n // The worker only builds v1 for a client that advertised it; reaching this\n // means the provider changed underneath the write. Refuse before any RPC.\n throw new Error('The write came back as a Solana transaction v1 (SIMD-0385) but this auth provider cannot sign v1. Nothing was signed.');\n }\n const shouldSubmit = (options === null || options === void 0 ? void 0 : options.shouldSubmitTx) !== false;\n const rpcUrl = (_c = config.rpcUrl) === null || _c === void 0 ? void 0 : _c.trim();\n const injectedRpc = (_d = options === null || options === void 0 ? void 0 : options._overrides) === null || _d === void 0 ? void 0 : _d._solanaRpc;\n if (shouldSubmit && !rpcUrl && !injectedRpc) {\n throw new Error(`Pre-built Solana transaction submission requires init({ rpcUrl }) for ${tx.network}. ` +\n `Pass a TOP-LEVEL rpcUrl (with chain) to init(), e.g. ` +\n `init({ appId, chain: '${tx.network}', rpcUrl: '<your ${tx.network} RPC endpoint>' }); ` +\n `a nested walletLogin.rpcUrl only configures wallet login and does not enable submission.`);\n }\n const { Connection } = await import('@solana/web3.js');\n const connection = injectedRpc !== null && injectedRpc !== void 0 ? injectedRpc : (rpcUrl ? new Connection(rpcUrl, 'confirmed') : null);\n const refreshed = await refreshLifetime(decoded.transaction, decoded.compiledMessage, decoded.kit, connection, tx);\n const signedTx = await authProvider.signTransactionV1(refreshed.transaction);\n if (!sameBytes(signedTx.messageBytes, refreshed.transaction.messageBytes)) {\n throw new Error('The signer changed the v1 transaction message instead of signing the exact transaction. Nothing was submitted.');\n }\n const feePayerAddress = String((_e = decoded.compiledMessage.staticAccounts[0]) !== null && _e !== void 0 ? _e : '');\n const feePayerSignature = signedTx.signatures[feePayerAddress];\n const rawTx = Uint8Array.from(decoded.kit.getTransactionEncoder().encode(signedTx));\n const signedTransaction = Buffer.from(rawTx).toString('base64');\n if (!shouldSubmit) {\n return { outcome: 'signed', lane: 'solana', transactionSignature: null, signedTransaction, fence: refreshed.fence };\n }\n if (!feePayerSignature || feePayerSignature.every((byte) => byte === 0)) {\n throw new Error('The signed v1 transaction carries no fee-payer signature; it cannot be submitted.');\n }\n // The transaction id is the fee payer's signature, derived from the signed bytes\n // BEFORE broadcasting so a lost send response still yields a reconcilable id.\n const signature = encodeBase58(Uint8Array.from(feePayerSignature));\n const submitRpc = connection;\n await (beforeBroadcast === null || beforeBroadcast === void 0 ? void 0 : beforeBroadcast({ transactionSignature: signature, signedTransaction, fence: refreshed.fence }));\n try {\n await submitRpc.sendRawTransaction(rawTx, { skipPreflight: false, maxRetries: 3 });\n }\n catch (error) {\n if (isDefinitiveSolanaSendFailure(error)) {\n if (isBoundedOnchainRuleRejection(error))\n throw markWriteNotApplied(new BoundedOnchainRuleRejection(error), 'broadcast_rejected');\n throw markWriteNotApplied(error, 'broadcast_rejected');\n }\n return {\n outcome: 'submitted', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,\n reason: `Broadcast response was lost or inconclusive: ${errorText(error)}`,\n };\n }\n const confirmation = await confirmSignature(submitRpc, { signature, lastValidBlockHeight: refreshed.fence.lastValidBlockHeight });\n if (!confirmation.landed) {\n return {\n outcome: 'submitted', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,\n reason: `Confirmation outcome unknown: ${confirmation.reason}`,\n };\n }\n if (confirmation.status.err)\n throw await landedTransactionFailure(submitRpc, signature, confirmation.status.err);\n return {\n outcome: 'confirmed', lane: 'solana', transactionSignature: signature, signedTransaction, fence: refreshed.fence,\n confirmationContextSlot: (_g = (_f = confirmation.status.slot) !== null && _f !== void 0 ? _f : confirmation.contextSlot) !== null && _g !== void 0 ? _g : 0,\n };\n}\n"],"names":["Buffer"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAAS,uBAAuB,CAAC,WAAW,EAAE;AAC9C,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CA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ACf,YAAY,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK;AAC5H,YAAY,MAAM,EAAE,CAAC,8BAA8B,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAC1E,SAAS;AACT,IAAI;AACJ,IAAI,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG;AAC/B,QAAQ,MAAM,MAAM,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;AAC3F,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK;AACxH,QAAQ,uBAAuB,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,YAAY,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,CAAC;AACpK,KAAK;AACL;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -353,18 +353,18 @@ export interface SolanaWriteRpc {
|
|
|
353
353
|
skipPreflight?: boolean;
|
|
354
354
|
maxRetries?: number;
|
|
355
355
|
}): Promise<string>;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
} | null;
|
|
356
|
+
/**
|
|
357
|
+
* A broadcast write is confirmed by polling these two over HTTPS (see
|
|
358
|
+
* `confirmSignature`), never through a WebSocket subscription: a page policy
|
|
359
|
+
* or proxy that admits the RPC host for https only must not stall a write.
|
|
360
|
+
*/
|
|
361
|
+
getSignatureStatuses(signatures: string[], config?: any): Promise<{
|
|
362
|
+
value?: Array<any>;
|
|
364
363
|
context?: {
|
|
365
364
|
slot?: number;
|
|
366
365
|
};
|
|
367
366
|
}>;
|
|
367
|
+
getBlockHeight(commitment?: any): Promise<number>;
|
|
368
368
|
getTransaction(signature: string, options?: any): Promise<any>;
|
|
369
369
|
/**
|
|
370
370
|
* A real web3.js `Connection` exposes its URL here. When present, the SDK reads
|
|
@@ -373,13 +373,6 @@ export interface SolanaWriteRpc {
|
|
|
373
373
|
* transaction, and a throw there must not be mistaken for "not landed".
|
|
374
374
|
*/
|
|
375
375
|
rpcEndpoint?: string;
|
|
376
|
-
getSignatureStatuses?(signatures: string[], config?: any): Promise<{
|
|
377
|
-
value?: Array<any>;
|
|
378
|
-
context?: {
|
|
379
|
-
slot?: number;
|
|
380
|
-
};
|
|
381
|
-
}>;
|
|
382
|
-
getBlockHeight?(commitment?: any): Promise<number>;
|
|
383
376
|
getSlot?(commitment?: any): Promise<number>;
|
|
384
377
|
}
|
|
385
378
|
export interface TransactionReceipt {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bounded-sh/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.118",
|
|
4
4
|
"description": "Shared client, data-plane, and transport primitives for Bounded, the full-stack app builder and runtime for AI-built apps: policy-enforced operations, files, functions, and realtime.",
|
|
5
5
|
"homepage": "https://bounded.sh/docs/sdk",
|
|
6
6
|
"main": "./dist/index.js",
|