@lifi/sdk-provider-solana 4.3.4 → 4.3.5
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/CHANGELOG.md +7 -0
- package/dist/cjs/core/tasks/SolanaSignAndExecuteTask.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/core/tasks/SolanaSignAndExecuteTask.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/package.json +2 -2
- package/src/core/tasks/SolanaSignAndExecuteTask.ts +5 -6
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaSignAndExecuteTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","getTransactionRequestData","base64ToUint8Array","withTimeout","getWalletFeature","SolanaSignTransaction","CLEARED_TRANSACTION_FIELDS","getTransactionCodec","encodeStoredTransactions"],"sources":["../../../../src/core/tasks/SolanaSignAndExecuteTask.ts"],"sourcesContent":["import {\n assertNoOpenTransaction,\n BaseStepExecutionTask,\n CLEARED_TRANSACTION_FIELDS,\n getTransactionRequestData,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n withTimeout,\n} from '@lifi/sdk'\nimport { getTransactionCodec } from '@solana/kit'\nimport { SolanaSignTransaction } from '@solana/wallet-standard-features'\nimport type { SolanaStepExecutorContext } from '../../types.js'\nimport { base64ToUint8Array } from '../../utils/base64ToUint8Array.js'\nimport { getWalletFeature } from '../../utils/getWalletFeature.js'\nimport { encodeStoredTransactions } from '../../utils/storedTransactions.js'\nimport { readSignature } from './readSignature.js'\n\nexport class SolanaSignAndExecuteTask extends BaseStepExecutionTask {\n async run(context: SolanaStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n wallet,\n getWalletAccount,\n statusManager,\n executionOptions,\n isBridgeExecution,\n } = context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n // Defence in depth: the selector sends an action with an open\n // transaction to the wait task. Signing here could put a second\n // transaction on chain while the first can still land.\n assertNoOpenTransaction(action)\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // Resolved here and not in `createContext`: a resume that only waits\n // never signs, so it must not fail because the wallet has not\n // reconnected yet.\n const walletAccount = getWalletAccount(step)\n\n const transactionRequestData = (await getTransactionRequestData(\n step,\n executionOptions\n )) as string | string[]\n\n // The backend returns an array when it produced a Jito bundle and a string\n // for a single transaction. The shape determines how we submit it later:\n // array -> sendBundle, string -> sendTransaction.\n const isBundleExecution = Array.isArray(transactionRequestData)\n\n const transactionDataArray = isBundleExecution\n ? transactionRequestData\n : [transactionRequestData]\n\n const transactionBytesArray = transactionDataArray.map((data) =>\n base64ToUint8Array(data)\n )\n\n // Checked again right before the wallet: a late write of an older run\n // can merge its transaction into this action during the await above.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n const signedTransactionOutputs = await withTimeout(\n async () => {\n const { signTransaction } = getWalletFeature(\n wallet,\n SolanaSignTransaction\n )\n // Spread the inputs to sign all transactions at once\n return signTransaction(\n ...transactionBytesArray.map((transaction) => ({\n account: walletAccount,\n transaction,\n }))\n )\n },\n {\n // https://solana.com/docs/advanced/confirmation#transaction-expiration\n // Use 2 minutes to account for fluctuations\n timeout: 120_000,\n errorInstance: new TransactionError(\n LiFiErrorCode.TransactionExpired,\n 'Transaction has expired: blockhash is no longer recent enough.'\n ),\n }\n )\n\n // Checked once more after the wallet: a stopped run's late write can\n // merge its transaction into this action while the prompt is open.\n // Nothing awaits from here to the two writes below, so no late write can\n // land between this check and either of them.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n if (signedTransactionOutputs.length === 0) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'No signed transaction returned from signer.'\n )\n }\n\n // Neither `txHash` nor `txLink` is written here. A signature is fixed at\n // signing, but the transaction does not exist yet: `getTransaction`\n // returns `null` for it, and simulation, the empty-Jito-RPC throw and\n // every send failure all sit between this task and the first broadcast.\n // The wait tasks write both on `onBroadcast`, when an RPC has accepted it.\n //\n // The previous transaction's fields (`CLEARED_TRANSACTION_FIELDS
|
|
1
|
+
{"version":3,"file":"SolanaSignAndExecuteTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","getTransactionRequestData","base64ToUint8Array","withTimeout","getWalletFeature","SolanaSignTransaction","CLEARED_TRANSACTION_FIELDS","getTransactionCodec","encodeStoredTransactions"],"sources":["../../../../src/core/tasks/SolanaSignAndExecuteTask.ts"],"sourcesContent":["import {\n assertNoOpenTransaction,\n BaseStepExecutionTask,\n CLEARED_TRANSACTION_FIELDS,\n getTransactionRequestData,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n withTimeout,\n} from '@lifi/sdk'\nimport { getTransactionCodec } from '@solana/kit'\nimport { SolanaSignTransaction } from '@solana/wallet-standard-features'\nimport type { SolanaStepExecutorContext } from '../../types.js'\nimport { base64ToUint8Array } from '../../utils/base64ToUint8Array.js'\nimport { getWalletFeature } from '../../utils/getWalletFeature.js'\nimport { encodeStoredTransactions } from '../../utils/storedTransactions.js'\nimport { readSignature } from './readSignature.js'\n\nexport class SolanaSignAndExecuteTask extends BaseStepExecutionTask {\n async run(context: SolanaStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n wallet,\n getWalletAccount,\n statusManager,\n executionOptions,\n isBridgeExecution,\n } = context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n // Defence in depth: the selector sends an action with an open\n // transaction to the wait task. Signing here could put a second\n // transaction on chain while the first can still land.\n assertNoOpenTransaction(action)\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // Resolved here and not in `createContext`: a resume that only waits\n // never signs, so it must not fail because the wallet has not\n // reconnected yet.\n const walletAccount = getWalletAccount(step)\n\n const transactionRequestData = (await getTransactionRequestData(\n step,\n executionOptions\n )) as string | string[]\n\n // The backend returns an array when it produced a Jito bundle and a string\n // for a single transaction. The shape determines how we submit it later:\n // array -> sendBundle, string -> sendTransaction.\n const isBundleExecution = Array.isArray(transactionRequestData)\n\n const transactionDataArray = isBundleExecution\n ? transactionRequestData\n : [transactionRequestData]\n\n const transactionBytesArray = transactionDataArray.map((data) =>\n base64ToUint8Array(data)\n )\n\n // Checked again right before the wallet: a late write of an older run\n // can merge its transaction into this action during the await above.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n const signedTransactionOutputs = await withTimeout(\n async () => {\n const { signTransaction } = getWalletFeature(\n wallet,\n SolanaSignTransaction\n )\n // Spread the inputs to sign all transactions at once\n return signTransaction(\n ...transactionBytesArray.map((transaction) => ({\n account: walletAccount,\n transaction,\n }))\n )\n },\n {\n // https://solana.com/docs/advanced/confirmation#transaction-expiration\n // Use 2 minutes to account for fluctuations\n timeout: 120_000,\n errorInstance: new TransactionError(\n LiFiErrorCode.TransactionExpired,\n 'Transaction has expired: blockhash is no longer recent enough.'\n ),\n }\n )\n\n // Checked once more after the wallet: a stopped run's late write can\n // merge its transaction into this action while the prompt is open.\n // Nothing awaits from here to the two writes below, so no late write can\n // land between this check and either of them.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n if (signedTransactionOutputs.length === 0) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'No signed transaction returned from signer.'\n )\n }\n\n // Neither `txHash` nor `txLink` is written here. A signature is fixed at\n // signing, but the transaction does not exist yet: `getTransaction`\n // returns `null` for it, and simulation, the empty-Jito-RPC throw and\n // every send failure all sit between this task and the first broadcast.\n // The wait tasks write both on `onBroadcast`, when an RPC has accepted it.\n //\n // The previous transaction's fields (`CLEARED_TRANSACTION_FIELDS`) are\n // cleared explicitly. Only a final failure reaches this task with them\n // set, and a stale hash would look open again once its `txFinal` is gone.\n // This write runs BEFORE the decode below, which can throw on a malformed\n // wallet output and would otherwise strand the old fields.\n statusManager.updateAction(step, action.type, 'PENDING', {\n ...CLEARED_TRANSACTION_FIELDS,\n signedAt: Date.now(),\n })\n\n const transactionCodec = getTransactionCodec()\n\n // Decode all signed transactions\n const signedTransactions = signedTransactionOutputs.map((output) =>\n transactionCodec.decode(output.signedTransaction)\n )\n\n // Every transaction must carry its fee payer signature before its bytes\n // are stored: an unreadable value would fail every resume the same way.\n // Nothing has been sent yet, so the `TransactionUnprepared` this throws\n // leaves \"Try again\" free to sign again.\n for (const signedTransaction of signedTransactions) {\n readSignature(signedTransaction)\n }\n\n // Stored before any send: a reload from here on resends these bytes\n // instead of asking the wallet again. A bundle stays a JSON array, which\n // is how a resume knows to submit it with `sendBundle`.\n statusManager.updateAction(step, action.type, 'PENDING', {\n txHex: encodeStoredTransactions(\n signedTransactionOutputs.map((output) => output.signedTransaction),\n isBundleExecution\n ),\n })\n\n return {\n status: 'COMPLETED',\n context: { signedTransactions, isBundleExecution },\n }\n }\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAa,2BAAb,cAA8CA,UAAAA,sBAAsB;CAClE,MAAM,IAAI,SAAyD;EACjE,MAAM,EACJ,MACA,QACA,kBACA,eACA,kBACA,sBACE;EAEJ,MAAM,SAAS,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MACtC;EAKA,CAAA,GAAA,UAAA,wBAAA,CAAwB,MAAM;EAE9B,IAAI,CAAC,QACH,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAMF,MAAM,gBAAgB,iBAAiB,IAAI;EAE3C,MAAM,yBAA0B,OAAA,GAAMC,UAAAA,0BAAAA,CACpC,MACA,gBACF;EAKA,MAAM,oBAAoB,MAAM,QAAQ,sBAAsB;EAM9D,MAAM,yBAJuB,oBACzB,yBACA,CAAC,sBAAsB,EAAA,CAEwB,KAAK,SACtDC,iCAAAA,mBAAmB,IAAI,CACzB;EAIA,CAAA,GAAA,UAAA,wBAAA,CAAwB,cAAc,WAAW,MAAM,OAAO,IAAI,CAAC;EAEnE,MAAM,2BAA2B,OAAA,GAAMC,UAAAA,YAAAA,CACrC,YAAY;GACV,MAAM,EAAE,oBAAoBC,+BAAAA,iBAC1B,QACAC,iCAAAA,qBACF;GAEA,OAAO,gBACL,GAAG,sBAAsB,KAAK,iBAAiB;IAC7C,SAAS;IACT;GACF,EAAE,CACJ;EACF,GACA;GAGE,SAAS;GACT,eAAe,IAAIN,UAAAA,iBACjBC,UAAAA,cAAc,oBACd,gEACF;EACF,CACF;EAMA,CAAA,GAAA,UAAA,wBAAA,CAAwB,cAAc,WAAW,MAAM,OAAO,IAAI,CAAC;EAEnE,IAAI,yBAAyB,WAAW,GACtC,MAAM,IAAID,UAAAA,iBACRC,UAAAA,cAAc,uBACd,6CACF;EAcF,cAAc,aAAa,MAAM,OAAO,MAAM,WAAW;GACvD,GAAGM,UAAAA;GACH,UAAU,KAAK,IAAI;EACrB,CAAC;EAED,MAAM,oBAAA,GAAmBC,YAAAA,oBAAAA,CAAoB;EAG7C,MAAM,qBAAqB,yBAAyB,KAAK,WACvD,iBAAiB,OAAO,OAAO,iBAAiB,CAClD;EAMA,KAAK,MAAM,qBAAqB,oBAC9B,iCAAA,cAAc,iBAAiB;EAMjC,cAAc,aAAa,MAAM,OAAO,MAAM,WAAW,EACvD,OAAOC,iCAAAA,yBACL,yBAAyB,KAAK,WAAW,OAAO,iBAAiB,GACjE,iBACF,EACF,CAAC;EAED,OAAO;GACL,QAAQ;GACR,SAAS;IAAE;IAAoB;GAAkB;EACnD;CACF;AACF"}
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-solana'\nexport const version = '4.3.
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-solana'\nexport const version = '4.3.5'\n"],"mappings":";;AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaSignAndExecuteTask.js","names":[],"sources":["../../../../src/core/tasks/SolanaSignAndExecuteTask.ts"],"sourcesContent":["import {\n assertNoOpenTransaction,\n BaseStepExecutionTask,\n CLEARED_TRANSACTION_FIELDS,\n getTransactionRequestData,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n withTimeout,\n} from '@lifi/sdk'\nimport { getTransactionCodec } from '@solana/kit'\nimport { SolanaSignTransaction } from '@solana/wallet-standard-features'\nimport type { SolanaStepExecutorContext } from '../../types.js'\nimport { base64ToUint8Array } from '../../utils/base64ToUint8Array.js'\nimport { getWalletFeature } from '../../utils/getWalletFeature.js'\nimport { encodeStoredTransactions } from '../../utils/storedTransactions.js'\nimport { readSignature } from './readSignature.js'\n\nexport class SolanaSignAndExecuteTask extends BaseStepExecutionTask {\n async run(context: SolanaStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n wallet,\n getWalletAccount,\n statusManager,\n executionOptions,\n isBridgeExecution,\n } = context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n // Defence in depth: the selector sends an action with an open\n // transaction to the wait task. Signing here could put a second\n // transaction on chain while the first can still land.\n assertNoOpenTransaction(action)\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // Resolved here and not in `createContext`: a resume that only waits\n // never signs, so it must not fail because the wallet has not\n // reconnected yet.\n const walletAccount = getWalletAccount(step)\n\n const transactionRequestData = (await getTransactionRequestData(\n step,\n executionOptions\n )) as string | string[]\n\n // The backend returns an array when it produced a Jito bundle and a string\n // for a single transaction. The shape determines how we submit it later:\n // array -> sendBundle, string -> sendTransaction.\n const isBundleExecution = Array.isArray(transactionRequestData)\n\n const transactionDataArray = isBundleExecution\n ? transactionRequestData\n : [transactionRequestData]\n\n const transactionBytesArray = transactionDataArray.map((data) =>\n base64ToUint8Array(data)\n )\n\n // Checked again right before the wallet: a late write of an older run\n // can merge its transaction into this action during the await above.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n const signedTransactionOutputs = await withTimeout(\n async () => {\n const { signTransaction } = getWalletFeature(\n wallet,\n SolanaSignTransaction\n )\n // Spread the inputs to sign all transactions at once\n return signTransaction(\n ...transactionBytesArray.map((transaction) => ({\n account: walletAccount,\n transaction,\n }))\n )\n },\n {\n // https://solana.com/docs/advanced/confirmation#transaction-expiration\n // Use 2 minutes to account for fluctuations\n timeout: 120_000,\n errorInstance: new TransactionError(\n LiFiErrorCode.TransactionExpired,\n 'Transaction has expired: blockhash is no longer recent enough.'\n ),\n }\n )\n\n // Checked once more after the wallet: a stopped run's late write can\n // merge its transaction into this action while the prompt is open.\n // Nothing awaits from here to the two writes below, so no late write can\n // land between this check and either of them.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n if (signedTransactionOutputs.length === 0) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'No signed transaction returned from signer.'\n )\n }\n\n // Neither `txHash` nor `txLink` is written here. A signature is fixed at\n // signing, but the transaction does not exist yet: `getTransaction`\n // returns `null` for it, and simulation, the empty-Jito-RPC throw and\n // every send failure all sit between this task and the first broadcast.\n // The wait tasks write both on `onBroadcast`, when an RPC has accepted it.\n //\n // The previous transaction's fields (`CLEARED_TRANSACTION_FIELDS
|
|
1
|
+
{"version":3,"file":"SolanaSignAndExecuteTask.js","names":[],"sources":["../../../../src/core/tasks/SolanaSignAndExecuteTask.ts"],"sourcesContent":["import {\n assertNoOpenTransaction,\n BaseStepExecutionTask,\n CLEARED_TRANSACTION_FIELDS,\n getTransactionRequestData,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n withTimeout,\n} from '@lifi/sdk'\nimport { getTransactionCodec } from '@solana/kit'\nimport { SolanaSignTransaction } from '@solana/wallet-standard-features'\nimport type { SolanaStepExecutorContext } from '../../types.js'\nimport { base64ToUint8Array } from '../../utils/base64ToUint8Array.js'\nimport { getWalletFeature } from '../../utils/getWalletFeature.js'\nimport { encodeStoredTransactions } from '../../utils/storedTransactions.js'\nimport { readSignature } from './readSignature.js'\n\nexport class SolanaSignAndExecuteTask extends BaseStepExecutionTask {\n async run(context: SolanaStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n wallet,\n getWalletAccount,\n statusManager,\n executionOptions,\n isBridgeExecution,\n } = context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n // Defence in depth: the selector sends an action with an open\n // transaction to the wait task. Signing here could put a second\n // transaction on chain while the first can still land.\n assertNoOpenTransaction(action)\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // Resolved here and not in `createContext`: a resume that only waits\n // never signs, so it must not fail because the wallet has not\n // reconnected yet.\n const walletAccount = getWalletAccount(step)\n\n const transactionRequestData = (await getTransactionRequestData(\n step,\n executionOptions\n )) as string | string[]\n\n // The backend returns an array when it produced a Jito bundle and a string\n // for a single transaction. The shape determines how we submit it later:\n // array -> sendBundle, string -> sendTransaction.\n const isBundleExecution = Array.isArray(transactionRequestData)\n\n const transactionDataArray = isBundleExecution\n ? transactionRequestData\n : [transactionRequestData]\n\n const transactionBytesArray = transactionDataArray.map((data) =>\n base64ToUint8Array(data)\n )\n\n // Checked again right before the wallet: a late write of an older run\n // can merge its transaction into this action during the await above.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n const signedTransactionOutputs = await withTimeout(\n async () => {\n const { signTransaction } = getWalletFeature(\n wallet,\n SolanaSignTransaction\n )\n // Spread the inputs to sign all transactions at once\n return signTransaction(\n ...transactionBytesArray.map((transaction) => ({\n account: walletAccount,\n transaction,\n }))\n )\n },\n {\n // https://solana.com/docs/advanced/confirmation#transaction-expiration\n // Use 2 minutes to account for fluctuations\n timeout: 120_000,\n errorInstance: new TransactionError(\n LiFiErrorCode.TransactionExpired,\n 'Transaction has expired: blockhash is no longer recent enough.'\n ),\n }\n )\n\n // Checked once more after the wallet: a stopped run's late write can\n // merge its transaction into this action while the prompt is open.\n // Nothing awaits from here to the two writes below, so no late write can\n // land between this check and either of them.\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n if (signedTransactionOutputs.length === 0) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'No signed transaction returned from signer.'\n )\n }\n\n // Neither `txHash` nor `txLink` is written here. A signature is fixed at\n // signing, but the transaction does not exist yet: `getTransaction`\n // returns `null` for it, and simulation, the empty-Jito-RPC throw and\n // every send failure all sit between this task and the first broadcast.\n // The wait tasks write both on `onBroadcast`, when an RPC has accepted it.\n //\n // The previous transaction's fields (`CLEARED_TRANSACTION_FIELDS`) are\n // cleared explicitly. Only a final failure reaches this task with them\n // set, and a stale hash would look open again once its `txFinal` is gone.\n // This write runs BEFORE the decode below, which can throw on a malformed\n // wallet output and would otherwise strand the old fields.\n statusManager.updateAction(step, action.type, 'PENDING', {\n ...CLEARED_TRANSACTION_FIELDS,\n signedAt: Date.now(),\n })\n\n const transactionCodec = getTransactionCodec()\n\n // Decode all signed transactions\n const signedTransactions = signedTransactionOutputs.map((output) =>\n transactionCodec.decode(output.signedTransaction)\n )\n\n // Every transaction must carry its fee payer signature before its bytes\n // are stored: an unreadable value would fail every resume the same way.\n // Nothing has been sent yet, so the `TransactionUnprepared` this throws\n // leaves \"Try again\" free to sign again.\n for (const signedTransaction of signedTransactions) {\n readSignature(signedTransaction)\n }\n\n // Stored before any send: a reload from here on resends these bytes\n // instead of asking the wallet again. A bundle stays a JSON array, which\n // is how a resume knows to submit it with `sendBundle`.\n statusManager.updateAction(step, action.type, 'PENDING', {\n txHex: encodeStoredTransactions(\n signedTransactionOutputs.map((output) => output.signedTransaction),\n isBundleExecution\n ),\n })\n\n return {\n status: 'COMPLETED',\n context: { signedTransactions, isBundleExecution },\n }\n }\n}\n"],"mappings":";;;;;;;;AAkBA,IAAa,2BAAb,cAA8C,sBAAsB;CAClE,MAAM,IAAI,SAAyD;EACjE,MAAM,EACJ,MACA,QACA,kBACA,eACA,kBACA,sBACE;EAEJ,MAAM,SAAS,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MACtC;EAKA,wBAAwB,MAAM;EAE9B,IAAI,CAAC,QACH,MAAM,IAAI,iBACR,cAAc,uBACd,kDACF;EAMF,MAAM,gBAAgB,iBAAiB,IAAI;EAE3C,MAAM,yBAA0B,MAAM,0BACpC,MACA,gBACF;EAKA,MAAM,oBAAoB,MAAM,QAAQ,sBAAsB;EAM9D,MAAM,yBAJuB,oBACzB,yBACA,CAAC,sBAAsB,EAAA,CAEwB,KAAK,SACtD,mBAAmB,IAAI,CACzB;EAIA,wBAAwB,cAAc,WAAW,MAAM,OAAO,IAAI,CAAC;EAEnE,MAAM,2BAA2B,MAAM,YACrC,YAAY;GACV,MAAM,EAAE,oBAAoB,iBAC1B,QACA,qBACF;GAEA,OAAO,gBACL,GAAG,sBAAsB,KAAK,iBAAiB;IAC7C,SAAS;IACT;GACF,EAAE,CACJ;EACF,GACA;GAGE,SAAS;GACT,eAAe,IAAI,iBACjB,cAAc,oBACd,gEACF;EACF,CACF;EAMA,wBAAwB,cAAc,WAAW,MAAM,OAAO,IAAI,CAAC;EAEnE,IAAI,yBAAyB,WAAW,GACtC,MAAM,IAAI,iBACR,cAAc,uBACd,6CACF;EAcF,cAAc,aAAa,MAAM,OAAO,MAAM,WAAW;GACvD,GAAG;GACH,UAAU,KAAK,IAAI;EACrB,CAAC;EAED,MAAM,mBAAmB,oBAAoB;EAG7C,MAAM,qBAAqB,yBAAyB,KAAK,WACvD,iBAAiB,OAAO,OAAO,iBAAiB,CAClD;EAMA,KAAK,MAAM,qBAAqB,oBAC9B,cAAc,iBAAiB;EAMjC,cAAc,aAAa,MAAM,OAAO,MAAM,WAAW,EACvD,OAAO,yBACL,yBAAyB,KAAK,WAAW,OAAO,iBAAiB,GACjE,iBACF,EACF,CAAC;EAED,OAAO;GACL,QAAQ;GACR,SAAS;IAAE;IAAoB;GAAkB;EACnD;CACF;AACF"}
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-solana'\nexport const version = '4.3.
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-solana'\nexport const version = '4.3.5'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/sdk-provider-solana",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.5",
|
|
4
4
|
"description": "LI.FI Solana SDK Provider for Any-to-Any Cross-Chain-Swap",
|
|
5
5
|
"homepage": "https://github.com/lifinance/sdk",
|
|
6
6
|
"bugs": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@lifi/sdk": "4.
|
|
31
|
+
"@lifi/sdk": "4.12.0",
|
|
32
32
|
"@solana/kit": "^8.4.0",
|
|
33
33
|
"@solana/wallet-standard-features": "^1.5.0",
|
|
34
34
|
"@wallet-standard/base": "^1.1.1"
|
|
@@ -115,12 +115,11 @@ export class SolanaSignAndExecuteTask extends BaseStepExecutionTask {
|
|
|
115
115
|
// every send failure all sit between this task and the first broadcast.
|
|
116
116
|
// The wait tasks write both on `onBroadcast`, when an RPC has accepted it.
|
|
117
117
|
//
|
|
118
|
-
// The previous transaction's fields (`CLEARED_TRANSACTION_FIELDS
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
// output and would otherwise strand the old fields.
|
|
118
|
+
// The previous transaction's fields (`CLEARED_TRANSACTION_FIELDS`) are
|
|
119
|
+
// cleared explicitly. Only a final failure reaches this task with them
|
|
120
|
+
// set, and a stale hash would look open again once its `txFinal` is gone.
|
|
121
|
+
// This write runs BEFORE the decode below, which can throw on a malformed
|
|
122
|
+
// wallet output and would otherwise strand the old fields.
|
|
124
123
|
statusManager.updateAction(step, action.type, 'PENDING', {
|
|
125
124
|
...CLEARED_TRANSACTION_FIELDS,
|
|
126
125
|
signedAt: Date.now(),
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/sdk-provider-solana'
|
|
2
|
-
export const version = '4.3.
|
|
2
|
+
export const version = '4.3.5'
|