@ledgerhq/device-signer-kit-solana 1.2.0 → 1.4.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 +110 -24
- package/lib/cjs/api/SignerSolana.js +1 -1
- package/lib/cjs/api/SignerSolana.js.map +1 -1
- package/lib/cjs/api/SolanaTools.js +1 -1
- package/lib/cjs/api/SolanaTools.js.map +1 -1
- package/lib/cjs/api/app-binder/SignMessageDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/index.js +1 -1
- package/lib/cjs/api/index.js.map +1 -1
- package/lib/cjs/api/model/SolanaTransactionOptionalConfig.js +2 -0
- package/lib/cjs/api/model/SolanaTransactionOptionalConfig.js.map +7 -0
- package/lib/cjs/api/model/TransactionResolutionContext.js +2 -0
- package/lib/cjs/api/model/TransactionResolutionContext.js.map +7 -0
- package/lib/cjs/internal/DefaultSignerSolana.js +1 -1
- package/lib/cjs/internal/DefaultSignerSolana.js.map +3 -3
- package/lib/cjs/internal/app-binder/SolanaAppBinder.js +1 -1
- package/lib/cjs/internal/app-binder/SolanaAppBinder.js.map +2 -2
- package/lib/cjs/internal/app-binder/SolanaAppBinder.test.js +1 -1
- package/lib/cjs/internal/app-binder/SolanaAppBinder.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/GetPubKeyCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetPubKeyCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.js.map +2 -2
- package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.test.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/services/GenerateSolanaTransaction.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/services/TransactionInspector.js +1 -3
- package/lib/cjs/internal/app-binder/services/TransactionInspector.js.map +3 -3
- package/lib/cjs/internal/app-binder/services/TransactionInspector.test.js +1 -1
- package/lib/cjs/internal/app-binder/services/TransactionInspector.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/services/bs58Encoder.js +2 -0
- package/lib/cjs/internal/app-binder/services/bs58Encoder.js.map +7 -0
- package/lib/cjs/internal/app-binder/services/utils/transactionDecoders.js +2 -0
- package/lib/cjs/internal/app-binder/services/utils/transactionDecoders.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js.map +1 -1
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendSignMessageTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendSignMessageTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SendSignMessageTask.test.js +3 -1
- package/lib/cjs/internal/app-binder/task/SendSignMessageTask.test.js.map +3 -3
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.js +1 -1
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.js.map +3 -3
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.test.js +1 -1
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.test.js.map +2 -2
- package/lib/cjs/package.json +2 -2
- package/lib/esm/api/index.js +1 -1
- package/lib/esm/api/index.js.map +1 -1
- package/lib/esm/api/model/SolanaTransactionOptionalConfig.js +1 -0
- package/lib/esm/api/model/TransactionResolutionContext.js +1 -0
- package/lib/esm/api/model/TransactionResolutionContext.js.map +7 -0
- package/lib/esm/internal/DefaultSignerSolana.js +1 -1
- package/lib/esm/internal/DefaultSignerSolana.js.map +3 -3
- package/lib/esm/internal/app-binder/SolanaAppBinder.js +1 -1
- package/lib/esm/internal/app-binder/SolanaAppBinder.js.map +2 -2
- package/lib/esm/internal/app-binder/SolanaAppBinder.test.js +1 -1
- package/lib/esm/internal/app-binder/SolanaAppBinder.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/GetPubKeyCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/GetPubKeyCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.js.map +2 -2
- package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.test.js +1 -1
- package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.test.js.map +2 -2
- package/lib/esm/internal/app-binder/services/GenerateSolanaTransaction.test.js.map +3 -3
- package/lib/esm/internal/app-binder/services/TransactionInspector.js +1 -3
- package/lib/esm/internal/app-binder/services/TransactionInspector.js.map +3 -3
- package/lib/esm/internal/app-binder/services/TransactionInspector.test.js +1 -1
- package/lib/esm/internal/app-binder/services/TransactionInspector.test.js.map +3 -3
- package/lib/esm/internal/app-binder/services/bs58Encoder.js +2 -0
- package/lib/esm/internal/app-binder/services/bs58Encoder.js.map +7 -0
- package/lib/esm/internal/app-binder/services/utils/transactionDecoders.js +2 -0
- package/lib/esm/internal/app-binder/services/utils/transactionDecoders.js.map +7 -0
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js +1 -1
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js.map +1 -1
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.test.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendSignMessageTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendSignMessageTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SendSignMessageTask.test.js +3 -1
- package/lib/esm/internal/app-binder/task/SendSignMessageTask.test.js.map +3 -3
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.js +1 -1
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.js.map +3 -3
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.test.js +1 -1
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.test.js.map +2 -2
- package/lib/esm/package.json +2 -2
- package/lib/types/api/SignerSolana.d.ts +2 -2
- package/lib/types/api/SignerSolana.d.ts.map +1 -1
- package/lib/types/api/SolanaTools.d.ts +1 -2
- package/lib/types/api/SolanaTools.d.ts.map +1 -1
- package/lib/types/api/app-binder/SignMessageDeviceActionTypes.d.ts +3 -2
- package/lib/types/api/app-binder/SignMessageDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts +2 -1
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/index.d.ts +1 -1
- package/lib/types/api/index.d.ts.map +1 -1
- package/lib/types/api/model/SolanaTransactionOptionalConfig.d.ts +7 -0
- package/lib/types/api/model/SolanaTransactionOptionalConfig.d.ts.map +1 -0
- package/lib/types/api/model/{TransactionOptions.d.ts → TransactionResolutionContext.d.ts} +2 -2
- package/lib/types/api/model/TransactionResolutionContext.d.ts.map +1 -0
- package/lib/types/internal/DefaultSignerSolana.d.ts +290 -1
- package/lib/types/internal/DefaultSignerSolana.d.ts.map +1 -1
- package/lib/types/internal/app-binder/SolanaAppBinder.d.ts +2 -1
- package/lib/types/internal/app-binder/SolanaAppBinder.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetPubKeyCommand.d.ts +3 -1
- package/lib/types/internal/app-binder/command/GetPubKeyCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignOffChainMessageCommand.d.ts +13 -9
- package/lib/types/internal/app-binder/command/SignOffChainMessageCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/SignTransactionDeviceAction.d.ts +3 -0
- package/lib/types/internal/app-binder/device-action/SignTransactionDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/services/TransactionInspector.d.ts +30 -5
- package/lib/types/internal/app-binder/services/TransactionInspector.d.ts.map +1 -1
- package/lib/types/internal/app-binder/services/bs58Encoder.d.ts +9 -0
- package/lib/types/internal/app-binder/services/bs58Encoder.d.ts.map +1 -0
- package/lib/types/internal/app-binder/services/utils/transactionDecoders.d.ts +14 -0
- package/lib/types/internal/app-binder/services/utils/transactionDecoders.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/BuildTransactionContextTask.d.ts +2 -2
- package/lib/types/internal/app-binder/task/BuildTransactionContextTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendSignMessageTask.d.ts +22 -6
- package/lib/types/internal/app-binder/task/SendSignMessageTask.d.ts.map +1 -1
- package/lib/types/internal/use-cases/transaction/SignTransactionUseCase.d.ts +2 -3
- package/lib/types/internal/use-cases/transaction/SignTransactionUseCase.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/lib/cjs/api/model/TransactionOptions.js +0 -2
- package/lib/cjs/api/model/TransactionOptions.js.map +0 -7
- package/lib/esm/api/model/TransactionOptions.js +0 -1
- package/lib/types/api/model/TransactionOptions.d.ts.map +0 -1
- /package/lib/esm/api/model/{TransactionOptions.js.map → SolanaTransactionOptionalConfig.js.map} +0 -0
|
@@ -2,9 +2,8 @@ import { type GenerateTransactionDAReturnType } from "./app-binder/GenerateTrans
|
|
|
2
2
|
import { type GetAddressDAReturnType } from "./app-binder/GetAddressDeviceActionTypes";
|
|
3
3
|
import { type GetAppConfigurationDAReturnType } from "./app-binder/GetAppConfigurationDeviceActionTypes";
|
|
4
4
|
import { type AddressOptions } from "./model/AddressOption";
|
|
5
|
-
import { type TransactionOptions } from "./model/TransactionOptions";
|
|
6
5
|
export interface SolanaTools {
|
|
7
|
-
generateTransaction: (derivationPath: string
|
|
6
|
+
generateTransaction: (derivationPath: string) => GenerateTransactionDAReturnType;
|
|
8
7
|
getAddress: (derivationPath: string, options?: AddressOptions) => GetAddressDAReturnType;
|
|
9
8
|
getAppConfiguration: () => GetAppConfigurationDAReturnType;
|
|
10
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaTools.d.ts","sourceRoot":"","sources":["../../../src/api/SolanaTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"SolanaTools.d.ts","sourceRoot":"","sources":["../../../src/api/SolanaTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,mBAAmB,EAAE,CACnB,cAAc,EAAE,MAAM,KACnB,+BAA+B,CAAC;IAErC,UAAU,EAAE,CACV,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,cAAc,KACrB,sBAAsB,CAAC;IAE5B,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;CAC5D"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ExecuteDeviceActionReturnType, type OpenAppDAError, type OpenAppDARequiredInteraction, type SendCommandInAppDAError, type UserInteractionRequired } from "@ledgerhq/device-management-kit";
|
|
2
|
-
import { type Signature } from "../model/Signature";
|
|
3
2
|
import { type SolanaAppErrorCodes } from "../../internal/app-binder/command/utils/SolanaApplicationErrors";
|
|
4
|
-
export type SignMessageDAOutput =
|
|
3
|
+
export type SignMessageDAOutput = {
|
|
4
|
+
signature: string;
|
|
5
|
+
};
|
|
5
6
|
export type SignMessageDAError = OpenAppDAError | SendCommandInAppDAError<SolanaAppErrorCodes>;
|
|
6
7
|
type SignMessageDARequiredInteraction = OpenAppDARequiredInteraction | UserInteractionRequired.SignPersonalMessage;
|
|
7
8
|
export type SignMessageDAIntermediateValue = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignMessageDeviceActionTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/SignMessageDeviceActionTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"SignMessageDeviceActionTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/SignMessageDeviceActionTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAEtG,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;AAEjD,KAAK,gCAAgC,GACjC,4BAA4B,GAC5B,uBAAuB,CAAC,mBAAmB,CAAC;AAEhD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,uBAAuB,EAAE,gCAAgC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,CACjE,mBAAmB,EACnB,kBAAkB,EAClB,8BAA8B,CAC/B,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { type SolanaTransactionContextResultSuccess } from "@ledgerhq/context-mo
|
|
|
3
3
|
import { type DeviceActionState, type ExecuteDeviceActionReturnType, type OpenAppDAError, type OpenAppDARequiredInteraction, type SendCommandInAppDAError, type UserInteractionRequired } from "@ledgerhq/device-management-kit";
|
|
4
4
|
import { type AppConfiguration } from "../model/AppConfiguration";
|
|
5
5
|
import { type Signature } from "../model/Signature";
|
|
6
|
+
import { type SolanaTransactionOptionalConfig } from "../model/SolanaTransactionOptionalConfig";
|
|
6
7
|
import { type Transaction } from "../model/Transaction";
|
|
7
8
|
import { type SolanaAppErrorCodes } from "../../internal/app-binder/command/utils/SolanaApplicationErrors";
|
|
8
9
|
import { type TxInspectorResult } from "../../internal/app-binder/services/TransactionInspector";
|
|
@@ -10,7 +11,7 @@ export type SignTransactionDAOutput = Signature;
|
|
|
10
11
|
export type SignTransactionDAInput = {
|
|
11
12
|
readonly derivationPath: string;
|
|
12
13
|
readonly transaction: Transaction;
|
|
13
|
-
readonly
|
|
14
|
+
readonly transactionOptions?: SolanaTransactionOptionalConfig;
|
|
14
15
|
readonly contextModule: ContextModule;
|
|
15
16
|
};
|
|
16
17
|
export type SignTransactionDAError = OpenAppDAError | SendCommandInAppDAError<SolanaAppErrorCodes>;
|
|
@@ -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,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAE5F,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEhD,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,
|
|
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,K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SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,wBAAwB,EAAE,qCAAqC,GAAG,IAAI,CAAC;IAChF,QAAQ,CAAC,eAAe,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,6BAA6B,CACrE,uBAAuB,EACvB,sBAAsB,EACtB,kCAAkC,CACnC,CAAC"}
|
package/lib/types/api/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export type { GetAppConfigurationDAError, GetAppConfigurationDAIntermediateValue
|
|
|
4
4
|
export type { SignMessageDAError, SignMessageDAIntermediateValue, SignMessageDAOutput, } from "./app-binder/SignMessageDeviceActionTypes";
|
|
5
5
|
export type { SignTransactionDAError, SignTransactionDAIntermediateValue, SignTransactionDAOutput, SignTransactionDAReturnType, } from "./app-binder/SignTransactionDeviceActionTypes";
|
|
6
6
|
export type { Signature } from "./model/Signature";
|
|
7
|
+
export type { SolanaTransactionOptionalConfig } from "./model/SolanaTransactionOptionalConfig";
|
|
7
8
|
export type { Transaction } from "./model/Transaction";
|
|
8
|
-
export type { TransactionOptions } from "./model/TransactionOptions";
|
|
9
9
|
export type { SignerSolana } from "./SignerSolana";
|
|
10
10
|
export { SignerSolanaBuilder } from "./SignerSolanaBuilder";
|
|
11
11
|
export type { SolanaTools } from "./SolanaTools";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,sDAAsD,CAAC;AAC9D,YAAY,EACV,iBAAiB,EACjB,6BAA6B,EAC7B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,2BAA2B,GAC5B,MAAM,sDAAsD,CAAC;AAC9D,YAAY,EACV,kBAAkB,EAClB,8BAA8B,EAC9B,mBAAmB,GACpB,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,sBAAsB,EACtB,kCAAkC,EAClC,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,sDAAsD,CAAC;AAC9D,YAAY,EACV,iBAAiB,EACjB,6BAA6B,EAC7B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,0BAA0B,EAC1B,sCAAsC,EACtC,2BAA2B,GAC5B,MAAM,sDAAsD,CAAC;AAC9D,YAAY,EACV,kBAAkB,EAClB,8BAA8B,EAC9B,mBAAmB,GACpB,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,sBAAsB,EACtB,kCAAkC,EAClC,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAClG,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TransactionResolutionContext } from "./TransactionResolutionContext";
|
|
2
|
+
export type SolanaTransactionOptionalConfig = {
|
|
3
|
+
transactionResolutionContext?: TransactionResolutionContext;
|
|
4
|
+
solanaRPCURL?: string;
|
|
5
|
+
skipOpenApp?: boolean;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=SolanaTransactionOptionalConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolanaTransactionOptionalConfig.d.ts","sourceRoot":"","sources":["../../../../src/api/model/SolanaTransactionOptionalConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAEnF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type TransactionResolutionContext = {
|
|
2
2
|
tokenAddress?: string;
|
|
3
3
|
createATA?: {
|
|
4
4
|
address: string;
|
|
5
5
|
mintAddress: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=TransactionResolutionContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionResolutionContext.d.ts","sourceRoot":"","sources":["../../../../src/api/model/TransactionResolutionContext.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { type SignMessageDAReturnType } from "../api/app-binder/SignMessageDevic
|
|
|
6
6
|
import { type SignTransactionDAReturnType } from "../api/app-binder/SignTransactionDeviceActionTypes";
|
|
7
7
|
import { type AddressOptions } from "../api/model/AddressOption";
|
|
8
8
|
import { type MessageOptions } from "../api/model/MessageOptions";
|
|
9
|
+
import { type SolanaTransactionOptionalConfig } from "../api/model/SolanaTransactionOptionalConfig";
|
|
9
10
|
import { type Transaction } from "../api/model/Transaction";
|
|
10
11
|
import { type SignerSolana } from "../api/SignerSolana";
|
|
11
12
|
export type DefaultSignerSolanaConstructorArgs = {
|
|
@@ -16,9 +17,297 @@ export type DefaultSignerSolanaConstructorArgs = {
|
|
|
16
17
|
export declare class DefaultSignerSolana implements SignerSolana {
|
|
17
18
|
private _container;
|
|
18
19
|
constructor({ dmk, sessionId, contextModule, }: DefaultSignerSolanaConstructorArgs);
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* ## signTransaction
|
|
22
|
+
* #### Securely sign a Solana or SPL transaction using **clear signing** on Ledger devices.
|
|
23
|
+
* ---
|
|
24
|
+
* ### Parameters
|
|
25
|
+
*
|
|
26
|
+
* **Required**
|
|
27
|
+
* - **derivationPath** `string`
|
|
28
|
+
* The derivation path used in the transaction.
|
|
29
|
+
*
|
|
30
|
+
* - **transaction** `Uint8Array`
|
|
31
|
+
* The serialised transaction to sign.
|
|
32
|
+
*
|
|
33
|
+
* **Optional**
|
|
34
|
+
* - **options** `SolanaTransactionOptionalConfig`
|
|
35
|
+
* Provides additional context for transaction signing.
|
|
36
|
+
*
|
|
37
|
+
* - **transactionResolutionContext** `object`
|
|
38
|
+
* Lets you explicitly pass `tokenAddress` and ATA details, bypassing extraction from the transaction itself.
|
|
39
|
+
*
|
|
40
|
+
* - **tokenAddress** `string`
|
|
41
|
+
* SPL token address being transferred.
|
|
42
|
+
*
|
|
43
|
+
* - **createATA** `object`
|
|
44
|
+
* Information about creating an associated token account (ATA).
|
|
45
|
+
*
|
|
46
|
+
* - **address** `string` – Address (owner) of the ATA.
|
|
47
|
+
* - **mintAddress** `string` – Mint address of the ATA.
|
|
48
|
+
*
|
|
49
|
+
* - **solanaRPCURL** `string`
|
|
50
|
+
* RPC endpoint to use if `transactionResolutionContext` is not provided
|
|
51
|
+
* and parsing requires network lookups.
|
|
52
|
+
* In browser environments, use a CORS-enabled RPC URL.
|
|
53
|
+
* Defaults to: `"https://api.mainnet-beta.solana.com/"`.
|
|
54
|
+
*
|
|
55
|
+
* - **skipOpenApp** `boolean`
|
|
56
|
+
* If `true`, skips opening the Solana app on the device.
|
|
57
|
+
*
|
|
58
|
+
* ---
|
|
59
|
+
* ### Returns
|
|
60
|
+
*
|
|
61
|
+
* - `observable` That emits DeviceActionState updates
|
|
62
|
+
* - `cancel` A function to cancel the action on the Ledger device.
|
|
63
|
+
*
|
|
64
|
+
* ---
|
|
65
|
+
* ### Internal Flow
|
|
66
|
+
*
|
|
67
|
+
* Under the hood, this method subscribes to an
|
|
68
|
+
* `Observable<DeviceActionState<Uint8Array, SignTransactionDAError, IntermediateValue>>`.
|
|
69
|
+
*
|
|
70
|
+
* #### DeviceActionState
|
|
71
|
+
* Represents the lifecycle of a device action:
|
|
72
|
+
*
|
|
73
|
+
* ```ts
|
|
74
|
+
* type DeviceActionState<Output, Error, IntermediateValue> =
|
|
75
|
+
* | { status: DeviceActionStatus.NotStarted }
|
|
76
|
+
* | { status: DeviceActionStatus.Pending; intermediateValue: IntermediateValue }
|
|
77
|
+
* | { status: DeviceActionStatus.Stopped }
|
|
78
|
+
* | { status: DeviceActionStatus.Completed; output: Output }
|
|
79
|
+
* | { status: DeviceActionStatus.Error; error: Error };
|
|
80
|
+
*
|
|
81
|
+
* enum DeviceActionStatus {
|
|
82
|
+
* NotStarted = "not-started",
|
|
83
|
+
* Pending = "pending",
|
|
84
|
+
* Stopped = "stopped",
|
|
85
|
+
* Completed = "completed",
|
|
86
|
+
* Error = "error"
|
|
87
|
+
* }
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* - **NotStarted** → Action hasn’t begun.
|
|
91
|
+
* - **Pending** → Waiting for user confirmation on the device.
|
|
92
|
+
* Includes an `intermediateValue` of type `IntermediateValue`.
|
|
93
|
+
* - **Stopped** → Action was cancelled before completion.
|
|
94
|
+
* - **Completed** → Provides the signed transaction bytes (`Uint8Array`).
|
|
95
|
+
* - **Error** → The device or signing operation failed (`SignTransactionDAError`).
|
|
96
|
+
*
|
|
97
|
+
* ---
|
|
98
|
+
* ### Example
|
|
99
|
+
*
|
|
100
|
+
* ```ts
|
|
101
|
+
* const { observable } = signerSolana.signTransaction("m/44'/501'/0'/0'", serializedTx, {
|
|
102
|
+
* transactionResolutionContext: resolution,
|
|
103
|
+
* });
|
|
104
|
+
* observable.subscribe({
|
|
105
|
+
* next: state => {
|
|
106
|
+
* if (state.status === DeviceActionStatus.Pending) {
|
|
107
|
+
* console.log("Waiting for user action...", state.intermediateValue);
|
|
108
|
+
* }
|
|
109
|
+
* if (state.status === DeviceActionStatus.Completed) {
|
|
110
|
+
* console.log("Signature:", state.output);
|
|
111
|
+
* }
|
|
112
|
+
* },
|
|
113
|
+
* error: err => console.error("Error:", err),
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
signTransaction(derivationPath: string, transaction: Transaction, solanaTransactionOptionalConfig?: SolanaTransactionOptionalConfig): SignTransactionDAReturnType;
|
|
118
|
+
/**
|
|
119
|
+
* ## signMessage
|
|
120
|
+
* #### Securely sign an arbitrary message on Ledger devices.
|
|
121
|
+
* ---
|
|
122
|
+
* ### Parameters
|
|
123
|
+
*
|
|
124
|
+
* **Required**
|
|
125
|
+
* - **derivationPath** `string`
|
|
126
|
+
* The derivation path used for signing.
|
|
127
|
+
*
|
|
128
|
+
* - **message** `string (hex-encoded)`
|
|
129
|
+
* The message to sign, provided as a hex string.
|
|
130
|
+
*
|
|
131
|
+
* **Optional**
|
|
132
|
+
* - **options** `MessageOptions`
|
|
133
|
+
* - **skipOpenApp** `boolean`
|
|
134
|
+
* If `true`, skips opening the Solana app on the device.
|
|
135
|
+
*
|
|
136
|
+
* ---
|
|
137
|
+
* ### Returns
|
|
138
|
+
*
|
|
139
|
+
* - `observable` That emits DeviceActionState updates
|
|
140
|
+
* - `cancel` A function to cancel the action on the Ledger device.
|
|
141
|
+
*
|
|
142
|
+
* ---
|
|
143
|
+
* ### Internal Flow
|
|
144
|
+
*
|
|
145
|
+
* Under the hood, this method subscribes to an
|
|
146
|
+
* `Observable<DeviceActionState<Uint8Array, SignMessageDAError, IntermediateValue>>`.
|
|
147
|
+
*
|
|
148
|
+
* #### DeviceActionState
|
|
149
|
+
* Represents the lifecycle of a device action:
|
|
150
|
+
*
|
|
151
|
+
* ```ts
|
|
152
|
+
* type DeviceActionState<Output, Error, IntermediateValue> =
|
|
153
|
+
* | { status: DeviceActionStatus.NotStarted }
|
|
154
|
+
* | { status: DeviceActionStatus.Pending; intermediateValue: IntermediateValue }
|
|
155
|
+
* | { status: DeviceActionStatus.Stopped }
|
|
156
|
+
* | { status: DeviceActionStatus.Completed; output: Output }
|
|
157
|
+
* | { status: DeviceActionStatus.Error; error: Error };
|
|
158
|
+
*
|
|
159
|
+
* enum DeviceActionStatus {
|
|
160
|
+
* NotStarted = "not-started",
|
|
161
|
+
* Pending = "pending",
|
|
162
|
+
* Stopped = "stopped",
|
|
163
|
+
* Completed = "completed",
|
|
164
|
+
* Error = "error"
|
|
165
|
+
* }
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* - **NotStarted** → Action hasn’t begun.
|
|
169
|
+
* - **Pending** → Waiting for user confirmation on the device.
|
|
170
|
+
* Includes an `intermediateValue` of type `IntermediateValue`.
|
|
171
|
+
* - **Stopped** → Action was cancelled before completion.
|
|
172
|
+
* - **Completed** → Provides the signed message bytes (`Uint8Array`).
|
|
173
|
+
* - **Error** → The device or signing operation failed (`SignMessageDAError`).
|
|
174
|
+
*
|
|
175
|
+
* ---
|
|
176
|
+
* ### Example
|
|
177
|
+
*
|
|
178
|
+
* ```ts
|
|
179
|
+
* const { observable } = signerSolana.signMessage(
|
|
180
|
+
* "m/44'/501'/0'/0'",
|
|
181
|
+
* "48656c6c6f20576f726c64" // hex string
|
|
182
|
+
* );
|
|
183
|
+
* observable.subscribe({
|
|
184
|
+
* next: state => {
|
|
185
|
+
* if (state.status === DeviceActionStatus.Pending) {
|
|
186
|
+
* console.log("Waiting for user action...", state.intermediateValue);
|
|
187
|
+
* }
|
|
188
|
+
* if (state.status === DeviceActionStatus.Completed) {
|
|
189
|
+
* console.log("Signature:", state.output);
|
|
190
|
+
* }
|
|
191
|
+
* },
|
|
192
|
+
* error: err => console.error("Error:", err),
|
|
193
|
+
* });
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
20
196
|
signMessage(derivationPath: string, message: string, options?: MessageOptions): SignMessageDAReturnType;
|
|
197
|
+
/**
|
|
198
|
+
* ## getAddress
|
|
199
|
+
* #### Retrieve a Solana address from Ledger devices.
|
|
200
|
+
* ---
|
|
201
|
+
* ### Parameters
|
|
202
|
+
*
|
|
203
|
+
* **Required**
|
|
204
|
+
* - **derivationPath** `string`
|
|
205
|
+
* The derivation path of the account to retrieve the address from.
|
|
206
|
+
*
|
|
207
|
+
* **Optional**
|
|
208
|
+
* - **options** `AddressOptions`
|
|
209
|
+
* - **checkOnDevice** `boolean`
|
|
210
|
+
* If `true`, prompts the user to verify the address on the device.
|
|
211
|
+
*
|
|
212
|
+
* - **skipOpenApp** `boolean`
|
|
213
|
+
* If `true`, skips opening the Solana app on the device.
|
|
214
|
+
*
|
|
215
|
+
* ---
|
|
216
|
+
* ### Returns
|
|
217
|
+
*
|
|
218
|
+
* - `observable` That emits DeviceActionState updates
|
|
219
|
+
* - `cancel` A function to cancel the action on the Ledger device.
|
|
220
|
+
*
|
|
221
|
+
* ---
|
|
222
|
+
* ### Internal Flow
|
|
223
|
+
*
|
|
224
|
+
* Under the hood, this method subscribes to an
|
|
225
|
+
* `Observable<DeviceActionState<string, GetAddressDAError, IntermediateValue>>`.
|
|
226
|
+
*
|
|
227
|
+
* #### DeviceActionState
|
|
228
|
+
* Represents the lifecycle of a device action:
|
|
229
|
+
*
|
|
230
|
+
* ```ts
|
|
231
|
+
* type DeviceActionState<Output, Error, IntermediateValue> =
|
|
232
|
+
* | { status: DeviceActionStatus.NotStarted }
|
|
233
|
+
* | { status: DeviceActionStatus.Pending; intermediateValue: IntermediateValue }
|
|
234
|
+
* | { status: DeviceActionStatus.Stopped }
|
|
235
|
+
* | { status: DeviceActionStatus.Completed; output: Output }
|
|
236
|
+
* | { status: DeviceActionStatus.Error; error: Error };
|
|
237
|
+
*
|
|
238
|
+
* enum DeviceActionStatus {
|
|
239
|
+
* NotStarted = "not-started",
|
|
240
|
+
* Pending = "pending",
|
|
241
|
+
* Stopped = "stopped",
|
|
242
|
+
* Completed = "completed",
|
|
243
|
+
* Error = "error"
|
|
244
|
+
* }
|
|
245
|
+
* ```
|
|
246
|
+
*
|
|
247
|
+
* - **NotStarted** → Action hasn’t begun.
|
|
248
|
+
* - **Pending** → Waiting for user confirmation on the device.
|
|
249
|
+
* Includes an `intermediateValue` of type `IntermediateValue`.
|
|
250
|
+
* - **Stopped** → Action was cancelled before completion.
|
|
251
|
+
* - **Completed** → Provides the base58-encoded address string, decoded to `Uint8Array`.
|
|
252
|
+
* - **Error** → The device or signing operation failed (`GetAddressDAError`).
|
|
253
|
+
*
|
|
254
|
+
*/
|
|
21
255
|
getAddress(derivationPath: string, options?: AddressOptions): GetAddressDAReturnType;
|
|
256
|
+
/**
|
|
257
|
+
* ## getAppConfiguration
|
|
258
|
+
* #### Retrieve the current Solana app configuration from a Ledger device.
|
|
259
|
+
* ---
|
|
260
|
+
* ### Parameters
|
|
261
|
+
*
|
|
262
|
+
* This method does not require any parameters.
|
|
263
|
+
*
|
|
264
|
+
* ---
|
|
265
|
+
* ### Returns
|
|
266
|
+
*
|
|
267
|
+
* - `observable` That emits DeviceActionState updates
|
|
268
|
+
* - `cancel` A function to cancel the action on the Ledger device.
|
|
269
|
+
*
|
|
270
|
+
* ---
|
|
271
|
+
* ### Internal Flow
|
|
272
|
+
*
|
|
273
|
+
* Under the hood, this method subscribes to an
|
|
274
|
+
* `Observable<DeviceActionState<GetAppConfigurationResult, Error, IntermediateValue>>`.
|
|
275
|
+
*
|
|
276
|
+
* #### DeviceActionState
|
|
277
|
+
* Represents the lifecycle of a device action:
|
|
278
|
+
*
|
|
279
|
+
* ```ts
|
|
280
|
+
* type DeviceActionState<Output, Error, IntermediateValue> =
|
|
281
|
+
* | { status: DeviceActionStatus.NotStarted }
|
|
282
|
+
* | { status: DeviceActionStatus.Pending; intermediateValue: IntermediateValue }
|
|
283
|
+
* | { status: DeviceActionStatus.Stopped }
|
|
284
|
+
* | { status: DeviceActionStatus.Completed; output: Output }
|
|
285
|
+
* | { status: DeviceActionStatus.Error; error: Error };
|
|
286
|
+
*
|
|
287
|
+
* enum DeviceActionStatus {
|
|
288
|
+
* NotStarted = "not-started",
|
|
289
|
+
* Pending = "pending",
|
|
290
|
+
* Stopped = "stopped",
|
|
291
|
+
* Completed = "completed",
|
|
292
|
+
* Error = "error"
|
|
293
|
+
* }
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* - **NotStarted** → Action hasn’t begun.
|
|
297
|
+
* - **Pending** → Waiting for user confirmation on the device.
|
|
298
|
+
* Includes an `intermediateValue` of type `IntermediateValue`.
|
|
299
|
+
* - **Stopped** → Action was cancelled before completion.
|
|
300
|
+
* - **Completed** → Provides the app configuration object.
|
|
301
|
+
* - **Error** → The device or signing operation failed.
|
|
302
|
+
*
|
|
303
|
+
* ---
|
|
304
|
+
* ### Example
|
|
305
|
+
*
|
|
306
|
+
* ```ts
|
|
307
|
+
* const config = await signerSolana.getAppConfiguration();
|
|
308
|
+
* console.log(config.version, config.flags);
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
22
311
|
getAppConfiguration(): GetAppConfigurationDAReturnType;
|
|
23
312
|
}
|
|
24
313
|
//# sourceMappingURL=DefaultSignerSolana.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSignerSolana.d.ts","sourceRoot":"","sources":["../../../src/internal/DefaultSignerSolana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAStD,MAAM,MAAM,kCAAkC,GAAG;IAC/C,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,qBAAa,mBAAoB,YAAW,YAAY;IACtD,OAAO,CAAC,UAAU,CAAY;gBAElB,EACV,GAAG,EACH,SAAS,EACT,aAAa,GACd,EAAE,kCAAkC;IAIrC,eAAe,CACb,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"DefaultSignerSolana.d.ts","sourceRoot":"","sources":["../../../src/internal/DefaultSignerSolana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,iCAAi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B,uBAAuB;IAM1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyDG;IACH,UAAU,CACR,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,sBAAsB;IAMzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;IACH,mBAAmB,IAAI,+BAA+B;CAKvD"}
|
|
@@ -5,6 +5,7 @@ import { GetAddressDAReturnType } from "../../api/app-binder/GetAddressDeviceAct
|
|
|
5
5
|
import { GetAppConfigurationDAReturnType } from "../../api/app-binder/GetAppConfigurationDeviceActionTypes";
|
|
6
6
|
import { SignMessageDAReturnType } from "../../api/app-binder/SignMessageDeviceActionTypes";
|
|
7
7
|
import { SignTransactionDAReturnType } from "../../api/app-binder/SignTransactionDeviceActionTypes";
|
|
8
|
+
import { SolanaTransactionOptionalConfig } from "../../api/model/SolanaTransactionOptionalConfig";
|
|
8
9
|
import { Transaction } from "../../api/model/Transaction";
|
|
9
10
|
export declare class SolanaAppBinder {
|
|
10
11
|
private dmk;
|
|
@@ -19,7 +20,7 @@ export declare class SolanaAppBinder {
|
|
|
19
20
|
signTransaction(args: {
|
|
20
21
|
derivationPath: string;
|
|
21
22
|
transaction: Transaction;
|
|
22
|
-
|
|
23
|
+
solanaTransactionOptionalConfig?: SolanaTransactionOptionalConfig;
|
|
23
24
|
}): SignTransactionDAReturnType;
|
|
24
25
|
generateTransaction(args: {
|
|
25
26
|
derivationPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaAppBinder.d.ts","sourceRoot":"","sources":["../../../../src/internal/app-binder/SolanaAppBinder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAEL,mBAAmB,EACnB,KAAK,eAAe,EAGrB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,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AA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AASrD,qBACa,eAAe;IAEG,OAAO,CAAC,GAAG;IACL,OAAO,CAAC,SAAS;IACb,OAAO,CAAC,aAAa;gBAFvB,GAAG,EAAE,mBAAmB,EAClB,SAAS,EAAE,eAAe,EACtB,aAAa,EAAE,aAAa;IAG3E,UAAU,CAAC,IAAI,EAAE;QACf,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,OAAO,CAAC;QACvB,WAAW,EAAE,OAAO,CAAC;KACtB,GAAG,sBAAsB;IAgB1B,eAAe,CAAC,IAAI,EAAE;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,WAAW,CAAC;QACzB,+BAA+B,CAAC,EAAE,+BAA+B,CAAC;KACnE,GAAG,2BAA2B;IAc/B,mBAAmB,CAAC,IAAI,EAAE;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,OAAO,CAAC;KACtB,GAAG,+BAA+B;IAanC,WAAW,CAAC,IAAI,EAAE;QAChB,cAAc,EAAE,MAAM,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,OAAO,CAAC;KACtB,GAAG,uBAAuB;IAkB3B,mBAAmB,IAAI,+BAA+B;CAavD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Apdu, type ApduResponse, type Command, type CommandResult } from "@ledgerhq/device-management-kit";
|
|
2
2
|
import { type PublicKey } from "../../../api/model/PublicKey";
|
|
3
|
+
import { type Bs58Encoder } from "../../app-binder/services/bs58Encoder";
|
|
3
4
|
import { type SolanaAppErrorCodes } from "./utils/SolanaApplicationErrors";
|
|
4
5
|
export type GetPubKeyCommandResponse = PublicKey;
|
|
5
6
|
export type GetPubKeyCommandArgs = {
|
|
@@ -7,9 +8,10 @@ export type GetPubKeyCommandArgs = {
|
|
|
7
8
|
checkOnDevice: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare class GetPubKeyCommand implements Command<GetPubKeyCommandResponse, GetPubKeyCommandArgs, SolanaAppErrorCodes> {
|
|
11
|
+
private readonly bs58Encoder;
|
|
10
12
|
private readonly errorHelper;
|
|
11
13
|
args: GetPubKeyCommandArgs;
|
|
12
|
-
constructor(args: GetPubKeyCommandArgs);
|
|
14
|
+
constructor(args: GetPubKeyCommandArgs, bs58Encoder?: Bs58Encoder);
|
|
13
15
|
getApdu(): Apdu;
|
|
14
16
|
parseResponse(response: ApduResponse): CommandResult<GetPubKeyCommandResponse, SolanaAppErrorCodes>;
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetPubKeyCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/GetPubKeyCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAIT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"GetPubKeyCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/GetPubKeyCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAIT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAIzC,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,qBAAa,gBACX,YACE,OAAO,CAAC,wBAAwB,EAAE,oBAAoB,EAAE,mBAAmB,CAAC;IAW5E,OAAO,CAAC,QAAQ,CAAC,WAAW;IAT9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAGuB;IAEnD,IAAI,EAAE,oBAAoB,CAAC;gBAGzB,IAAI,EAAE,oBAAoB,EACT,WAAW,GAAE,WAAgC;IAKhE,OAAO,IAAI,IAAI;IAmBf,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;CAwBhE"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { type Apdu, type ApduResponse, type Command, type CommandResult } from "@ledgerhq/device-management-kit";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ChunkableCommandArgs } from "../../app-binder/task/SendCommandInChunksTask";
|
|
3
3
|
import { type SolanaAppErrorCodes } from "./utils/SolanaApplicationErrors";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
4
|
+
export declare const CLA = 224;
|
|
5
|
+
export declare const INS = 7;
|
|
6
|
+
export declare const P1 = 1;
|
|
7
|
+
export declare const SOL_P2: {
|
|
8
|
+
INIT: number;
|
|
9
|
+
EXTEND: number;
|
|
10
|
+
MORE: number;
|
|
7
11
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
args:
|
|
11
|
-
constructor(args:
|
|
12
|
+
export type SignOffChainRawResponse = Uint8Array;
|
|
13
|
+
export declare class SignOffChainMessageCommand implements Command<SignOffChainRawResponse, ChunkableCommandArgs, SolanaAppErrorCodes> {
|
|
14
|
+
readonly args: ChunkableCommandArgs;
|
|
15
|
+
constructor(args: ChunkableCommandArgs);
|
|
12
16
|
getApdu(): Apdu;
|
|
13
|
-
parseResponse(response: ApduResponse): CommandResult<
|
|
17
|
+
parseResponse(response: ApduResponse): CommandResult<SignOffChainRawResponse, SolanaAppErrorCodes>;
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=SignOffChainMessageCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignOffChainMessageCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/SignOffChainMessageCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"SignOffChainMessageCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/SignOffChainMessageCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAE9F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,eAAO,MAAM,GAAG,MAAO,CAAC;AACxB,eAAO,MAAM,GAAG,IAAO,CAAC;AACxB,eAAO,MAAM,EAAE,IAAO,CAAC;AAIvB,eAAO,MAAM,MAAM;;;;CAIlB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD,qBAAa,0BACX,YACE,OAAO,CAAC,uBAAuB,EAAE,oBAAoB,EAAE,mBAAmB,CAAC;IAEjE,QAAQ,CAAC,IAAI,EAAE,oBAAoB;gBAA1B,IAAI,EAAE,oBAAoB;IAE/C,OAAO,IAAI,IAAI;IAef,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;CAY/D"}
|
|
@@ -3,6 +3,7 @@ import { type Maybe } from "purify-ts";
|
|
|
3
3
|
import { type SignTransactionDAError, type SignTransactionDAInput, type SignTransactionDAIntermediateValue, type SignTransactionDAInternalState, type SignTransactionDAOutput } from "../../../api/app-binder/SignTransactionDeviceActionTypes";
|
|
4
4
|
import { type AppConfiguration } from "../../../api/model/AppConfiguration";
|
|
5
5
|
import { type Signature } from "../../../api/model/Signature";
|
|
6
|
+
import { type TransactionResolutionContext } from "../../../api/model/TransactionResolutionContext";
|
|
6
7
|
import { type SolanaAppErrorCodes } from "../../app-binder/command/utils/SolanaApplicationErrors";
|
|
7
8
|
import { type TxInspectorResult } from "../../app-binder/services/TransactionInspector";
|
|
8
9
|
import { type BuildTransactionContextTaskArgs, type SolanaBuildContextResult } from "../../app-binder/task/BuildTransactionContextTask";
|
|
@@ -17,6 +18,8 @@ export type MachineDependencies = {
|
|
|
17
18
|
}) => Promise<Maybe<CommandErrorResult<SolanaAppErrorCodes>>>;
|
|
18
19
|
readonly inspectTransaction: (arg0: {
|
|
19
20
|
serializedTransaction: Uint8Array;
|
|
21
|
+
resolutionContext?: TransactionResolutionContext;
|
|
22
|
+
rpcUrl?: string;
|
|
20
23
|
}) => Promise<TxInspectorResult>;
|
|
21
24
|
readonly signTransaction: (arg0: {
|
|
22
25
|
input: {
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"SignTransactionDeviceAction.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BAAkB,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;QACjD,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,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;IAoWD,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,mBAAmB;CAkDnE"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { type PublicKey } from "@solana/web3.js";
|
|
1
2
|
export declare enum SolanaTransactionTypes {
|
|
2
3
|
STANDARD = "Standard",
|
|
3
4
|
SPL = "SPL"
|
|
4
5
|
}
|
|
5
|
-
export
|
|
6
|
+
export type NormalizedCompiledIx = {
|
|
7
|
+
programIdIndex: number;
|
|
8
|
+
accountKeyIndexes: number[];
|
|
9
|
+
data: Uint8Array;
|
|
10
|
+
};
|
|
11
|
+
export type NormalizedMessage = {
|
|
12
|
+
compiledInstructions: NormalizedCompiledIx[];
|
|
13
|
+
allKeys: PublicKey[];
|
|
14
|
+
};
|
|
15
|
+
export type TxInspectorResult = {
|
|
6
16
|
transactionType: SolanaTransactionTypes;
|
|
7
17
|
data: {
|
|
8
18
|
tokenAddress?: string;
|
|
@@ -11,11 +21,26 @@ export interface TxInspectorResult {
|
|
|
11
21
|
mintAddress: string;
|
|
12
22
|
};
|
|
13
23
|
};
|
|
14
|
-
}
|
|
24
|
+
};
|
|
15
25
|
export declare class TransactionInspector {
|
|
16
26
|
private readonly rawTransactionBytes;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
private
|
|
27
|
+
private readonly tokenAddress?;
|
|
28
|
+
private readonly createATA?;
|
|
29
|
+
private readonly injectedRPCURL?;
|
|
30
|
+
constructor(rawTransactionBytes: Uint8Array, tokenAddress?: string | undefined, createATA?: {
|
|
31
|
+
address: string;
|
|
32
|
+
mintAddress: string;
|
|
33
|
+
} | undefined, injectedRPCURL?: string | undefined);
|
|
34
|
+
inspectTransactionType(): Promise<TxInspectorResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Normalise any tx (legacy or v0) into { compiledInstructions, allKeys }.
|
|
37
|
+
* For v0, auto-fetch looked-up addresses from ALT(s) via the connection.
|
|
38
|
+
*/
|
|
39
|
+
private normaliseMessage;
|
|
40
|
+
private tryDeserialiseVersioned;
|
|
41
|
+
/**
|
|
42
|
+
* For v0, fetch looked-up addresses from ALT(s) via the connection
|
|
43
|
+
*/
|
|
44
|
+
private resolveLookedUpAddressesFromMessage;
|
|
20
45
|
}
|
|
21
46
|
//# sourceMappingURL=TransactionInspector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionInspector.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/services/TransactionInspector.ts"],"names":[],"mappings":"
|
|
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;A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uint8Array;
|
|
4
|
+
}
|
|
5
|
+
export declare class DefaultBs58Encoder {
|
|
6
|
+
static encode(data: Uint8Array): string;
|
|
7
|
+
static decode(encoded: string): Uint8Array;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=bs58Encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bs58Encoder.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/services/bs58Encoder.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;CACrC;AAED,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;IAGvC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU;CAG3C"}
|