@ledgerhq/device-signer-kit-solana 0.0.0-transactionInspector-resolutionObj-20250916113438 → 0.0.0-transactionInspector-resolutionObj-20250916153045
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/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.js.map +1 -1
- package/lib/cjs/internal/app-binder/services/TransactionInspector.js +1 -1
- package/lib/cjs/internal/app-binder/services/TransactionInspector.js.map +3 -3
- package/lib/cjs/internal/app-binder/services/utils/transactionDecoders.js +1 -1
- package/lib/cjs/internal/app-binder/services/utils/transactionDecoders.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.js.map +1 -1
- package/lib/esm/internal/app-binder/services/TransactionInspector.js +1 -1
- package/lib/esm/internal/app-binder/services/TransactionInspector.js.map +3 -3
- package/lib/esm/internal/app-binder/services/utils/transactionDecoders.js +1 -1
- package/lib/esm/internal/app-binder/services/utils/transactionDecoders.js.map +3 -3
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts +1 -1
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/SignTransactionDeviceAction.d.ts +1 -1
- package/lib/types/internal/app-binder/device-action/SignTransactionDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/services/TransactionInspector.d.ts +11 -2
- package/lib/types/internal/app-binder/services/TransactionInspector.d.ts.map +1 -1
- package/lib/types/internal/app-binder/services/utils/transactionDecoders.d.ts +1 -12
- package/lib/types/internal/app-binder/services/utils/transactionDecoders.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ASSOCIATED_TOKEN_PROGRAM_ID as
|
|
1
|
+
import{ASSOCIATED_TOKEN_PROGRAM_ID as a,decodeBurnCheckedInstruction as l,decodeBurnInstruction as A,decodeCloseAccountInstruction as I,decodeFreezeAccountInstruction as p,decodeInitializeAccount2Instruction as b,decodeInitializeAccount3Instruction as m,decodeInitializeAccountInstruction as h,decodeInitializeImmutableOwnerInstruction as B,decodeSyncNativeInstruction as T,decodeThawAccountInstruction as w,decodeTransferCheckedInstruction as x,decodeTransferCheckedWithFeeInstruction as C,decodeTransferInstruction as P,TOKEN_2022_PROGRAM_ID as d,TOKEN_PROGRAM_ID as i}from"@solana/spl-token";const s=e=>e.equals(i)||e.equals(d),o=e=>{try{return e()}catch{return null}},z=[{when:({programId:e})=>e.equals(a),decode:({ixMeta:e,message:n})=>{const t=y=>{const u=e.accountKeyIndexes[y];return u!==void 0?n.allKeys[u]??null:null},c=t(1),k=t(2),r=t(3);return!k||!r||!c?null:{createATA:{address:c.toBase58(),mintAddress:r.toBase58()}}}},{when:({programId:e})=>e.equals(d),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{destination:t}}=C(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{destination:t}}=P(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{destination:t}}=x(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t,mint:c}}=h(e,n);return{createATA:{address:t.pubkey.toBase58(),mintAddress:c.pubkey.toBase58()}}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t,mint:c}}=b(e,n);return{createATA:{address:t.pubkey.toBase58(),mintAddress:c.pubkey.toBase58()}}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t,mint:c}}=m(e,n);return{createATA:{address:t.pubkey.toBase58(),mintAddress:c.pubkey.toBase58()}}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=B(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=I(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=T(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=l(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=A(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=p(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>s(e),decode:({instruction:e,programId:n})=>o(()=>{const{keys:{account:t}}=w(e,n);return{tokenAddress:t.pubkey.toBase58()}})},{when:({programId:e})=>e.equals(a)||e.equals(i)||e.equals(d),decode:()=>null}];export{z as DECODERS};
|
|
2
2
|
//# sourceMappingURL=transactionDecoders.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/internal/app-binder/services/utils/transactionDecoders.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n ASSOCIATED_TOKEN_PROGRAM_ID,\n decodeBurnCheckedInstruction,\n decodeBurnInstruction,\n decodeCloseAccountInstruction,\n decodeFreezeAccountInstruction,\n decodeInitializeAccount2Instruction,\n decodeInitializeAccount3Instruction,\n decodeInitializeAccountInstruction,\n decodeInitializeImmutableOwnerInstruction,\n decodeSyncNativeInstruction,\n decodeThawAccountInstruction,\n decodeTransferCheckedInstruction,\n decodeTransferCheckedWithFeeInstruction,\n decodeTransferInstruction,\n
|
|
5
|
-
"mappings": "AAAA,OACE,+BAAAA,EACA,gCAAAC,EACA,yBAAAC,EACA,iCAAAC,EACA,kCAAAC,EACA,uCAAAC,EACA,uCAAAC,EACA,sCAAAC,EACA,6CAAAC,EACA,+BAAAC,EACA,gCAAAC,EACA,oCAAAC,EACA,2CAAAC,EACA,6BAAAC,EACA,
|
|
6
|
-
"names": ["ASSOCIATED_TOKEN_PROGRAM_ID", "decodeBurnCheckedInstruction", "decodeBurnInstruction", "decodeCloseAccountInstruction", "decodeFreezeAccountInstruction", "decodeInitializeAccount2Instruction", "decodeInitializeAccount3Instruction", "decodeInitializeAccountInstruction", "decodeInitializeImmutableOwnerInstruction", "decodeSyncNativeInstruction", "decodeThawAccountInstruction", "decodeTransferCheckedInstruction", "decodeTransferCheckedWithFeeInstruction", "decodeTransferInstruction", "
|
|
4
|
+
"sourcesContent": ["import {\n ASSOCIATED_TOKEN_PROGRAM_ID,\n decodeBurnCheckedInstruction,\n decodeBurnInstruction,\n decodeCloseAccountInstruction,\n decodeFreezeAccountInstruction,\n decodeInitializeAccount2Instruction,\n decodeInitializeAccount3Instruction,\n decodeInitializeAccountInstruction,\n decodeInitializeImmutableOwnerInstruction,\n decodeSyncNativeInstruction,\n decodeThawAccountInstruction,\n decodeTransferCheckedInstruction,\n decodeTransferCheckedWithFeeInstruction,\n decodeTransferInstruction,\n TOKEN_2022_PROGRAM_ID,\n TOKEN_PROGRAM_ID,\n} from \"@solana/spl-token\";\nimport { type PublicKey, type TransactionInstruction } from \"@solana/web3.js\";\n\nimport {\n type NormalizedCompiledIx,\n type NormalizedMessage,\n type TxInspectorResult,\n} from \"@internal/app-binder/services/TransactionInspector\";\n\nexport type IxContext = {\n programId: PublicKey;\n ixMeta: NormalizedCompiledIx;\n message: NormalizedMessage;\n instruction: TransactionInstruction;\n};\n\nexport type Decoder = {\n when: (ctx: IxContext) => boolean;\n decode: (ctx: IxContext) => TxInspectorResult[\"data\"] | null;\n};\n\nconst isTokenProgramId = (pid: PublicKey) =>\n pid.equals(TOKEN_PROGRAM_ID) || pid.equals(TOKEN_2022_PROGRAM_ID);\n\nconst safe = <T>(fn: () => T): T | null => {\n try {\n return fn();\n } catch {\n return null;\n }\n};\n\nexport const DECODERS: Decoder[] = [\n // ATA creation (with derivation fallback)\n {\n when: ({ programId }) => programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID),\n decode: ({ ixMeta, message }) => {\n const byIdx = (n: number): PublicKey | null => {\n const i = ixMeta.accountKeyIndexes[n];\n return i !== undefined ? (message.allKeys[i] ?? null) : null;\n };\n\n const ataPk = byIdx(1);\n const ownerPk = byIdx(2);\n const mintPk = byIdx(3);\n if (!ownerPk || !mintPk || !ataPk) return null;\n\n return {\n createATA: {\n address: ataPk.toBase58(),\n mintAddress: mintPk.toBase58(),\n },\n };\n },\n },\n\n // Token-2022 fee\u2019d transfer (CWIF)\n {\n when: ({ programId }) => programId.equals(TOKEN_2022_PROGRAM_ID),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { destination },\n } = decodeTransferCheckedWithFeeInstruction(instruction, programId);\n return {\n tokenAddress: destination.pubkey.toBase58(),\n };\n }),\n },\n\n // Transfers\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { destination },\n } = decodeTransferInstruction(instruction, programId);\n return { tokenAddress: destination.pubkey.toBase58() };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { destination },\n } = decodeTransferCheckedInstruction(instruction, programId);\n return {\n tokenAddress: destination.pubkey.toBase58(),\n };\n }),\n },\n\n // Account init\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account, mint },\n } = decodeInitializeAccountInstruction(instruction, programId);\n return {\n createATA: {\n address: account.pubkey.toBase58(),\n mintAddress: mint.pubkey.toBase58(),\n },\n };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account, mint },\n } = decodeInitializeAccount2Instruction(instruction, programId);\n return {\n createATA: {\n address: account.pubkey.toBase58(),\n mintAddress: mint.pubkey.toBase58(),\n },\n };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account, mint },\n } = decodeInitializeAccount3Instruction(instruction, programId);\n return {\n createATA: {\n address: account.pubkey.toBase58(),\n mintAddress: mint.pubkey.toBase58(),\n },\n };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeInitializeImmutableOwnerInstruction(instruction, programId);\n return { tokenAddress: account.pubkey.toBase58() };\n }),\n },\n\n // Lifecycle / WSOL\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeCloseAccountInstruction(instruction, programId);\n return { tokenAddress: account.pubkey.toBase58() };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeSyncNativeInstruction(instruction, programId);\n return { tokenAddress: account.pubkey.toBase58() };\n }),\n },\n\n // Mint / Burn\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeBurnCheckedInstruction(instruction, programId);\n return {\n tokenAddress: account.pubkey.toBase58(),\n };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeBurnInstruction(instruction, programId);\n return {\n tokenAddress: account.pubkey.toBase58(),\n };\n }),\n },\n\n // Freeze / Thaw\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeFreezeAccountInstruction(instruction, programId);\n return {\n tokenAddress: account.pubkey.toBase58(),\n };\n }),\n },\n {\n when: ({ programId }) => isTokenProgramId(programId),\n decode: ({ instruction, programId }) =>\n safe(() => {\n const {\n keys: { account },\n } = decodeThawAccountInstruction(instruction, programId);\n return {\n tokenAddress: account.pubkey.toBase58(),\n };\n }),\n },\n\n // LAST-RESORT: tag as SPL by program id only (when decoders can't run)\n {\n when: ({ programId }) =>\n programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID) ||\n programId.equals(TOKEN_PROGRAM_ID) ||\n programId.equals(TOKEN_2022_PROGRAM_ID),\n decode: () => null,\n },\n];\n"],
|
|
5
|
+
"mappings": "AAAA,OACE,+BAAAA,EACA,gCAAAC,EACA,yBAAAC,EACA,iCAAAC,EACA,kCAAAC,EACA,uCAAAC,EACA,uCAAAC,EACA,sCAAAC,EACA,6CAAAC,EACA,+BAAAC,EACA,gCAAAC,EACA,oCAAAC,EACA,2CAAAC,EACA,6BAAAC,EACA,yBAAAC,EACA,oBAAAC,MACK,oBAqBP,MAAMC,EAAoBC,GACxBA,EAAI,OAAOF,CAAgB,GAAKE,EAAI,OAAOH,CAAqB,EAE5DI,EAAWC,GAA0B,CACzC,GAAI,CACF,OAAOA,EAAG,CACZ,MAAQ,CACN,OAAO,IACT,CACF,EAEaC,EAAsB,CAEjC,CACE,KAAM,CAAC,CAAE,UAAAC,CAAU,IAAMA,EAAU,OAAOrB,CAA2B,EACrE,OAAQ,CAAC,CAAE,OAAAsB,EAAQ,QAAAC,CAAQ,IAAM,CAC/B,MAAMC,EAASC,GAAgC,CAC7C,MAAMC,EAAIJ,EAAO,kBAAkBG,CAAC,EACpC,OAAOC,IAAM,OAAaH,EAAQ,QAAQG,CAAC,GAAK,KAAQ,IAC1D,EAEMC,EAAQH,EAAM,CAAC,EACfI,EAAUJ,EAAM,CAAC,EACjBK,EAASL,EAAM,CAAC,EACtB,MAAI,CAACI,GAAW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,EAAiBK,CAAS,EACnD,OAAQ,CAAC,CAAE,YAAAS,EAAa,UAAAT,CAAU,IAChCH,EAAK,IAAM,CACT,KAAM,CACJ,KAAM,CAAE,QAAAc,CAAQ,CAClB,EAAItB,EAA6BoB,EAAaT,CAAS,EACvD,MAAO,CACL,aAAcW,EAAQ,OAAO,SAAS,CACxC,CACF,CAAC,CACL,EAGA,CACE,KAAM,CAAC,CAAE,UAAAX,CAAU,IACjBA,EAAU,OAAOrB,CAA2B,GAC5CqB,EAAU,OAAON,CAAgB,GACjCM,EAAU,OAAOP,CAAqB,EACxC,OAAQ,IAAM,IAChB,CACF",
|
|
6
|
+
"names": ["ASSOCIATED_TOKEN_PROGRAM_ID", "decodeBurnCheckedInstruction", "decodeBurnInstruction", "decodeCloseAccountInstruction", "decodeFreezeAccountInstruction", "decodeInitializeAccount2Instruction", "decodeInitializeAccount3Instruction", "decodeInitializeAccountInstruction", "decodeInitializeImmutableOwnerInstruction", "decodeSyncNativeInstruction", "decodeThawAccountInstruction", "decodeTransferCheckedInstruction", "decodeTransferCheckedWithFeeInstruction", "decodeTransferInstruction", "TOKEN_2022_PROGRAM_ID", "TOKEN_PROGRAM_ID", "isTokenProgramId", "pid", "safe", "fn", "DECODERS", "programId", "ixMeta", "message", "byIdx", "n", "i", "ataPk", "ownerPk", "mintPk", "instruction", "destination", "account", "mint"]
|
|
7
7
|
}
|
|
@@ -6,7 +6,7 @@ import { type Signature } from "../model/Signature";
|
|
|
6
6
|
import { type Transaction } from "../model/Transaction";
|
|
7
7
|
import { type TransactionResolutionContext } from "../model/TransactionResolutionContext";
|
|
8
8
|
import { type SolanaAppErrorCodes } from "../../internal/app-binder/command/utils/SolanaApplicationErrors";
|
|
9
|
-
import { type TxInspectorResult } from "../../internal/app-binder/services/
|
|
9
|
+
import { type TxInspectorResult } from "../../internal/app-binder/services/TransactionInspector";
|
|
10
10
|
export type SignTransactionDAOutput = Signature;
|
|
11
11
|
export type SignTransactionDAInput = {
|
|
12
12
|
readonly derivationPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignTransactionDeviceActionTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/SignTransactionDeviceActionTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,kEAAkE,CAAC;AAC9H,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAC5F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SignTransactionDeviceActionTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/SignTransactionDeviceActionTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,kEAAkE,CAAC;AAC9H,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE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AAG,IAAI,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,6BAA6B,CACrE,uBAAuB,EACvB,sBAAsB,EACtB,kCAAkC,CACnC,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { type AppConfiguration } from "../../../api/model/AppConfiguration";
|
|
|
5
5
|
import { type Signature } from "../../../api/model/Signature";
|
|
6
6
|
import { type TransactionResolutionContext } from "../../../api/model/TransactionResolutionContext";
|
|
7
7
|
import { type SolanaAppErrorCodes } from "../../app-binder/command/utils/SolanaApplicationErrors";
|
|
8
|
-
import { type TxInspectorResult } from "../../app-binder/services/
|
|
8
|
+
import { type TxInspectorResult } from "../../app-binder/services/TransactionInspector";
|
|
9
9
|
import { type BuildTransactionContextTaskArgs, type SolanaBuildContextResult } from "../../app-binder/task/BuildTransactionContextTask";
|
|
10
10
|
import { type SolanaContextForDevice } from "../../app-binder/task/ProvideTransactionContextTask";
|
|
11
11
|
export type MachineDependencies = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignTransactionDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/device-action/SignTransactionDeviceAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAMhB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAQ,KAAK,KAAK,EAAS,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC7B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAG5F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAMtG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SignTransactionDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/device-action/SignTransactionDeviceAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAMhB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAQ,KAAK,KAAK,EAAS,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC7B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAG5F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAMtG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC9B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yDAAyD,CAAC;AAGjE,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAClC,aAAa,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,CACrD,CAAC;IACF,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE;QAC5B,KAAK,EAAE,+BAA+B,CAAC;KACxC,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE;QAC9B,KAAK,EAAE,sBAAsB,CAAC;KAC/B,KAAK,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE;QAClC,qBAAqB,EAAE,UAAU,CAAC;QAClC,iBAAiB,CAAC,EAAE,4BAA4B,CAAC;KAClD,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE;QAC/B,KAAK,EAAE;YACL,cAAc,EAAE,MAAM,CAAC;YACvB,qBAAqB,EAAE,UAAU,CAAC;SACnC,CAAC;KACH,KAAK,OAAO,CACX,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,CAC3E,CAAC;CACH,CAAC;AAEF,qBAAa,2BAA4B,SAAQ,kBAAkB,CACjE,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,kCAAkC,EAClC,8BAA8B,CAC/B;IACC,gBAAgB,CACd,WAAW,EAAE,WAAW,GACvB,wBAAwB,CACzB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,kCAAkC,EAClC,8BAA8B,CAC/B;IA8VD,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,mBAAmB;CAgDnE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type PublicKey } from "@solana/web3.js";
|
|
2
|
-
import { type TxInspectorResult } from "../../app-binder/services/utils/transactionDecoders";
|
|
3
2
|
export declare enum SolanaTransactionTypes {
|
|
4
3
|
STANDARD = "Standard",
|
|
5
4
|
SPL = "SPL"
|
|
@@ -13,6 +12,16 @@ export type NormalizedMessage = {
|
|
|
13
12
|
compiledInstructions: NormalizedCompiledIx[];
|
|
14
13
|
allKeys: PublicKey[];
|
|
15
14
|
};
|
|
15
|
+
export interface TxInspectorResult {
|
|
16
|
+
transactionType: SolanaTransactionTypes;
|
|
17
|
+
data: {
|
|
18
|
+
tokenAddress?: string;
|
|
19
|
+
createATA?: {
|
|
20
|
+
address: string;
|
|
21
|
+
mintAddress: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
16
25
|
export declare class TransactionInspector {
|
|
17
26
|
private readonly rawTransactionBytes;
|
|
18
27
|
private readonly tokenAddress?;
|
|
@@ -24,7 +33,7 @@ export declare class TransactionInspector {
|
|
|
24
33
|
inspectTransactionType(): Promise<TxInspectorResult>;
|
|
25
34
|
/**
|
|
26
35
|
* Normalise any tx (legacy or v0) into { compiledInstructions, allKeys }.
|
|
27
|
-
* For v0,
|
|
36
|
+
* For v0, auto-fetch looked-up addresses from ALT(s) via the baked-in connection.
|
|
28
37
|
*/
|
|
29
38
|
private normaliseMessage;
|
|
30
39
|
private tryDeserialiseVersioned;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionInspector.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/services/TransactionInspector.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TransactionInspector.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/services/TransactionInspector.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,iBAAiB,CAAC;AAQzB,oBAAY,sBAAsB;IAChC,QAAQ,aAAa;IACrB,GAAG,QAAQ;CACZ;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,oBAAoB,EAAE,oBAAoB,EAAE,CAAC;IAC7C,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,sBAAsB,CAAC;IACxC,IAAI,EAAE;QACJ,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC;KACtD,CAAC;CACH;AAcD,qBAAa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAFV,mBAAmB,EAAE,UAAU,EAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,YAAA,EAC5B,SAAS,CAAC,EAAE;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,IAAI,YAAA;IAGG,sBAAsB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IA6EjE;;;OAGG;YACW,gBAAgB;IA0F9B,OAAO,CAAC,uBAAuB;CAchC"}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { type PublicKey, type TransactionInstruction } from "@solana/web3.js";
|
|
2
|
-
import { type NormalizedCompiledIx, type NormalizedMessage, type
|
|
3
|
-
export interface TxInspectorResult {
|
|
4
|
-
transactionType: SolanaTransactionTypes;
|
|
5
|
-
data: {
|
|
6
|
-
tokenAddress?: string;
|
|
7
|
-
mintAddress?: string;
|
|
8
|
-
createATA?: {
|
|
9
|
-
address: string;
|
|
10
|
-
mintAddress: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
}
|
|
2
|
+
import { type NormalizedCompiledIx, type NormalizedMessage, type TxInspectorResult } from "../../../app-binder/services/TransactionInspector";
|
|
14
3
|
export type IxContext = {
|
|
15
4
|
programId: PublicKey;
|
|
16
5
|
ixMeta: NormalizedCompiledIx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionDecoders.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/app-binder/services/utils/transactionDecoders.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactionDecoders.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/app-binder/services/utils/transactionDecoders.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,oDAAoD,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,WAAW,EAAE,sBAAsB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC;IAClC,MAAM,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,iBAAiB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC9D,CAAC;AAaF,eAAO,MAAM,QAAQ,EAAE,OAAO,EAyM7B,CAAC"}
|