@crossmint/wallets-sdk 0.1.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/LICENSE +201 -0
- package/README.md +1 -0
- package/dist/api/client.cjs +1 -0
- package/dist/api/client.d.cts +57 -0
- package/dist/api/client.d.ts +57 -0
- package/dist/api/client.js +1 -0
- package/dist/api/gen/client.gen.cjs +1 -0
- package/dist/api/gen/client.gen.d.cts +16 -0
- package/dist/api/gen/client.gen.d.ts +16 -0
- package/dist/api/gen/client.gen.js +1 -0
- package/dist/api/gen/index.cjs +1 -0
- package/dist/api/gen/index.d.cts +3 -0
- package/dist/api/gen/index.d.ts +3 -0
- package/dist/api/gen/index.js +1 -0
- package/dist/api/gen/sdk.gen.cjs +1 -0
- package/dist/api/gen/sdk.gen.d.cts +181 -0
- package/dist/api/gen/sdk.gen.d.ts +181 -0
- package/dist/api/gen/sdk.gen.js +1 -0
- package/dist/api/gen/types.gen.cjs +1 -0
- package/dist/api/gen/types.gen.d.cts +3755 -0
- package/dist/api/gen/types.gen.d.ts +3755 -0
- package/dist/api/gen/types.gen.js +1 -0
- package/dist/api/index.cjs +1 -0
- package/dist/api/index.d.cts +4 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +1 -0
- package/dist/chunk-22GIA4MK.js +1 -0
- package/dist/chunk-5M7IRODB.js +1 -0
- package/dist/chunk-64NR5QRR.js +1 -0
- package/dist/chunk-6DTBGTSS.cjs +1 -0
- package/dist/chunk-6RTTEIHW.cjs +1 -0
- package/dist/chunk-6W35AARC.js +1 -0
- package/dist/chunk-6XOH62PV.cjs +1 -0
- package/dist/chunk-6ZSPKEHA.js +1 -0
- package/dist/chunk-7PGV52LP.cjs +1 -0
- package/dist/chunk-7Y2E7VNV.js +1 -0
- package/dist/chunk-A7F5DWC7.js +0 -0
- package/dist/chunk-AADORF6G.js +1 -0
- package/dist/chunk-AHFMV7RZ.cjs +1 -0
- package/dist/chunk-ASZ42HGR.js +1 -0
- package/dist/chunk-C2WL57HT.cjs +1 -0
- package/dist/chunk-CGHMCYX6.js +0 -0
- package/dist/chunk-CK4JCQY6.cjs +1 -0
- package/dist/chunk-DANM4IBF.cjs +1 -0
- package/dist/chunk-DBOB7H6W.cjs +1 -0
- package/dist/chunk-E2EM43SP.cjs +1 -0
- package/dist/chunk-EHPQ2A6Z.cjs +1 -0
- package/dist/chunk-F2XDGZCB.cjs +1 -0
- package/dist/chunk-F7GTDFYC.cjs +1 -0
- package/dist/chunk-FBBHIN3M.cjs +1 -0
- package/dist/chunk-FUHBLVE7.cjs +1 -0
- package/dist/chunk-GS3FTDMM.cjs +1 -0
- package/dist/chunk-HKY6CBZC.js +1 -0
- package/dist/chunk-ICVV5CBS.js +1 -0
- package/dist/chunk-IUCH2YM2.cjs +1 -0
- package/dist/chunk-JGR6BPVQ.js +1 -0
- package/dist/chunk-K7ZLWZPC.js +1 -0
- package/dist/chunk-KVFFSUF4.js +1 -0
- package/dist/chunk-LX6WD7J6.js +1 -0
- package/dist/chunk-MFUN74KH.cjs +1 -0
- package/dist/chunk-NTRGH35O.cjs +1 -0
- package/dist/chunk-NZYUMZHK.js +1 -0
- package/dist/chunk-PBNETIRB.js +1 -0
- package/dist/chunk-QL7OSVKM.js +0 -0
- package/dist/chunk-RRJH2PAJ.cjs +1 -0
- package/dist/chunk-RUIBT3JV.cjs +1 -0
- package/dist/chunk-SDH5CVH7.js +0 -0
- package/dist/chunk-SILEK5O4.js +1 -0
- package/dist/chunk-STYSP6KL.cjs +1 -0
- package/dist/chunk-TYK4I7OU.js +1 -0
- package/dist/chunk-WVCL7F3L.js +1 -0
- package/dist/chunk-XPMCPXI3.cjs +1 -0
- package/dist/chunk-XYHAZU5Y.cjs +1 -0
- package/dist/chunk-YMRXMNME.js +0 -0
- package/dist/evm/abi/entryPoint.cjs +1 -0
- package/dist/evm/abi/entryPoint.d.cts +777 -0
- package/dist/evm/abi/entryPoint.d.ts +777 -0
- package/dist/evm/abi/entryPoint.js +1 -0
- package/dist/evm/chains/definitions/story.cjs +1 -0
- package/dist/evm/chains/definitions/story.d.cts +44 -0
- package/dist/evm/chains/definitions/story.d.ts +44 -0
- package/dist/evm/chains/definitions/story.js +1 -0
- package/dist/evm/chains/definitions/storyTestnet.cjs +1 -0
- package/dist/evm/chains/definitions/storyTestnet.d.cts +38 -0
- package/dist/evm/chains/definitions/storyTestnet.d.ts +38 -0
- package/dist/evm/chains/definitions/storyTestnet.js +1 -0
- package/dist/evm/chains/index.cjs +1 -0
- package/dist/evm/chains/index.d.cts +12 -0
- package/dist/evm/chains/index.d.ts +12 -0
- package/dist/evm/chains/index.js +1 -0
- package/dist/evm/index.cjs +1 -0
- package/dist/evm/index.d.cts +6 -0
- package/dist/evm/index.d.ts +6 -0
- package/dist/evm/index.js +1 -0
- package/dist/evm/wallet.cjs +1 -0
- package/dist/evm/wallet.d.cts +184 -0
- package/dist/evm/wallet.d.ts +184 -0
- package/dist/evm/wallet.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +1 -0
- package/dist/sdk.cjs +1 -0
- package/dist/sdk.d.cts +25 -0
- package/dist/sdk.d.ts +25 -0
- package/dist/sdk.js +1 -0
- package/dist/services/types.cjs +1 -0
- package/dist/services/types.d.cts +40 -0
- package/dist/services/types.d.ts +40 -0
- package/dist/services/types.js +0 -0
- package/dist/services/wallet-factory.cjs +1 -0
- package/dist/services/wallet-factory.d.cts +23 -0
- package/dist/services/wallet-factory.d.ts +23 -0
- package/dist/services/wallet-factory.js +1 -0
- package/dist/solana/index.cjs +1 -0
- package/dist/solana/index.d.cts +11 -0
- package/dist/solana/index.d.ts +11 -0
- package/dist/solana/index.js +1 -0
- package/dist/solana/services/approvals-service.cjs +1 -0
- package/dist/solana/services/approvals-service.d.cts +16 -0
- package/dist/solana/services/approvals-service.d.ts +16 -0
- package/dist/solana/services/approvals-service.js +1 -0
- package/dist/solana/services/delegated-signers-service.cjs +1 -0
- package/dist/solana/services/delegated-signers-service.d.cts +20 -0
- package/dist/solana/services/delegated-signers-service.d.ts +20 -0
- package/dist/solana/services/delegated-signers-service.js +1 -0
- package/dist/solana/services/transactions-service.cjs +1 -0
- package/dist/solana/services/transactions-service.d.cts +25 -0
- package/dist/solana/services/transactions-service.d.ts +25 -0
- package/dist/solana/services/transactions-service.js +1 -0
- package/dist/solana/tokens.cjs +1 -0
- package/dist/solana/tokens.d.cts +3 -0
- package/dist/solana/tokens.d.ts +3 -0
- package/dist/solana/tokens.js +1 -0
- package/dist/solana/types/signers.cjs +1 -0
- package/dist/solana/types/signers.d.cts +38 -0
- package/dist/solana/types/signers.d.ts +38 -0
- package/dist/solana/types/signers.js +1 -0
- package/dist/solana/utils.cjs +1 -0
- package/dist/solana/utils.d.cts +6 -0
- package/dist/solana/utils.d.ts +6 -0
- package/dist/solana/utils.js +1 -0
- package/dist/solana/wallet.cjs +1 -0
- package/dist/solana/wallet.d.cts +52 -0
- package/dist/solana/wallet.d.ts +52 -0
- package/dist/solana/wallet.js +1 -0
- package/dist/utils/constants.cjs +1 -0
- package/dist/utils/constants.d.cts +7 -0
- package/dist/utils/constants.d.ts +7 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +1 -0
- package/package.json +40 -0
package/dist/sdk.d.cts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
|
+
export { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
|
+
import { WalletTypeToArgs, WalletTypeToWallet } from './services/types.cjs';
|
|
4
|
+
import './solana/wallet.cjs';
|
|
5
|
+
import './evm/wallet.cjs';
|
|
6
|
+
import './evm/chains/index.cjs';
|
|
7
|
+
import 'viem';
|
|
8
|
+
import './solana/types/signers.cjs';
|
|
9
|
+
import '@solana/web3.js';
|
|
10
|
+
import './api/client.cjs';
|
|
11
|
+
import './api/gen/types.gen.cjs';
|
|
12
|
+
import './solana/tokens.cjs';
|
|
13
|
+
import './solana/services/transactions-service.cjs';
|
|
14
|
+
import './solana/services/approvals-service.cjs';
|
|
15
|
+
import './solana/services/delegated-signers-service.cjs';
|
|
16
|
+
|
|
17
|
+
type WalletType = keyof WalletTypeToArgs;
|
|
18
|
+
declare class CrossmintWallet {
|
|
19
|
+
private readonly walletFactory;
|
|
20
|
+
private constructor();
|
|
21
|
+
static from(crossmint: Crossmint): CrossmintWallet;
|
|
22
|
+
getOrCreateWallet<T extends WalletType>(type: T, args: WalletTypeToArgs[T]): Promise<WalletTypeToWallet[T]>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { CrossmintWallet };
|
package/dist/sdk.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
|
+
export { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
|
+
import { WalletTypeToArgs, WalletTypeToWallet } from './services/types.js';
|
|
4
|
+
import './solana/wallet.js';
|
|
5
|
+
import './evm/wallet.js';
|
|
6
|
+
import './evm/chains/index.js';
|
|
7
|
+
import 'viem';
|
|
8
|
+
import './solana/types/signers.js';
|
|
9
|
+
import '@solana/web3.js';
|
|
10
|
+
import './api/client.js';
|
|
11
|
+
import './api/gen/types.gen.js';
|
|
12
|
+
import './solana/tokens.js';
|
|
13
|
+
import './solana/services/transactions-service.js';
|
|
14
|
+
import './solana/services/approvals-service.js';
|
|
15
|
+
import './solana/services/delegated-signers-service.js';
|
|
16
|
+
|
|
17
|
+
type WalletType = keyof WalletTypeToArgs;
|
|
18
|
+
declare class CrossmintWallet {
|
|
19
|
+
private readonly walletFactory;
|
|
20
|
+
private constructor();
|
|
21
|
+
static from(crossmint: Crossmint): CrossmintWallet;
|
|
22
|
+
getOrCreateWallet<T extends WalletType>(type: T, args: WalletTypeToArgs[T]): Promise<WalletTypeToWallet[T]>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { CrossmintWallet };
|
package/dist/sdk.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-PBNETIRB.js";import"./chunk-A7F5DWC7.js";import"./chunk-64NR5QRR.js";import"./chunk-AADORF6G.js";import"./chunk-QL7OSVKM.js";import"./chunk-SDH5CVH7.js";import"./chunk-6ZSPKEHA.js";import"./chunk-TYK4I7OU.js";import"./chunk-JGR6BPVQ.js";import"./chunk-ICVV5CBS.js";import"./chunk-6W35AARC.js";import"./chunk-K7ZLWZPC.js";import"./chunk-CGHMCYX6.js";import"./chunk-NZYUMZHK.js";import"./chunk-HKY6CBZC.js";import"./chunk-7Y2E7VNV.js";import"./chunk-KVFFSUF4.js";import"./chunk-SILEK5O4.js";import"./chunk-LX6WD7J6.js";import"./chunk-ASZ42HGR.js";import"./chunk-22GIA4MK.js";export{a as CrossmintWallet};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EVMSmartWallet, EVMMPCWallet, EVMSignerInput } from '../evm/wallet.cjs';
|
|
2
|
+
import { SolanaSmartWallet, SolanaMPCWallet } from '../solana/wallet.cjs';
|
|
3
|
+
import { EVMSmartWalletChain } from '../evm/chains/index.cjs';
|
|
4
|
+
import { SolanaSignerInput } from '../solana/types/signers.cjs';
|
|
5
|
+
import '../api/client.cjs';
|
|
6
|
+
import '@crossmint/common-sdk-base';
|
|
7
|
+
import 'viem';
|
|
8
|
+
import '../api/gen/types.gen.cjs';
|
|
9
|
+
import '@solana/web3.js';
|
|
10
|
+
import '../solana/tokens.cjs';
|
|
11
|
+
import '../solana/services/transactions-service.cjs';
|
|
12
|
+
import '../solana/services/approvals-service.cjs';
|
|
13
|
+
import '../solana/services/delegated-signers-service.cjs';
|
|
14
|
+
|
|
15
|
+
type WalletTypeToWallet = {
|
|
16
|
+
"evm-smart-wallet": EVMSmartWallet;
|
|
17
|
+
"evm-mpc-wallet": EVMMPCWallet;
|
|
18
|
+
"solana-smart-wallet": SolanaSmartWallet;
|
|
19
|
+
"solana-mpc-wallet": SolanaMPCWallet;
|
|
20
|
+
};
|
|
21
|
+
type WalletTypeToArgs = {
|
|
22
|
+
"evm-smart-wallet": {
|
|
23
|
+
chain: EVMSmartWalletChain;
|
|
24
|
+
adminSigner: EVMSignerInput;
|
|
25
|
+
linkedUser?: string;
|
|
26
|
+
};
|
|
27
|
+
"evm-mpc-wallet": {
|
|
28
|
+
chain: EVMSmartWalletChain;
|
|
29
|
+
linkedUser: string;
|
|
30
|
+
};
|
|
31
|
+
"solana-smart-wallet": {
|
|
32
|
+
adminSigner?: SolanaSignerInput;
|
|
33
|
+
linkedUser?: string;
|
|
34
|
+
};
|
|
35
|
+
"solana-mpc-wallet": {
|
|
36
|
+
linkedUser: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type { WalletTypeToArgs, WalletTypeToWallet };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EVMSmartWallet, EVMMPCWallet, EVMSignerInput } from '../evm/wallet.js';
|
|
2
|
+
import { SolanaSmartWallet, SolanaMPCWallet } from '../solana/wallet.js';
|
|
3
|
+
import { EVMSmartWalletChain } from '../evm/chains/index.js';
|
|
4
|
+
import { SolanaSignerInput } from '../solana/types/signers.js';
|
|
5
|
+
import '../api/client.js';
|
|
6
|
+
import '@crossmint/common-sdk-base';
|
|
7
|
+
import 'viem';
|
|
8
|
+
import '../api/gen/types.gen.js';
|
|
9
|
+
import '@solana/web3.js';
|
|
10
|
+
import '../solana/tokens.js';
|
|
11
|
+
import '../solana/services/transactions-service.js';
|
|
12
|
+
import '../solana/services/approvals-service.js';
|
|
13
|
+
import '../solana/services/delegated-signers-service.js';
|
|
14
|
+
|
|
15
|
+
type WalletTypeToWallet = {
|
|
16
|
+
"evm-smart-wallet": EVMSmartWallet;
|
|
17
|
+
"evm-mpc-wallet": EVMMPCWallet;
|
|
18
|
+
"solana-smart-wallet": SolanaSmartWallet;
|
|
19
|
+
"solana-mpc-wallet": SolanaMPCWallet;
|
|
20
|
+
};
|
|
21
|
+
type WalletTypeToArgs = {
|
|
22
|
+
"evm-smart-wallet": {
|
|
23
|
+
chain: EVMSmartWalletChain;
|
|
24
|
+
adminSigner: EVMSignerInput;
|
|
25
|
+
linkedUser?: string;
|
|
26
|
+
};
|
|
27
|
+
"evm-mpc-wallet": {
|
|
28
|
+
chain: EVMSmartWalletChain;
|
|
29
|
+
linkedUser: string;
|
|
30
|
+
};
|
|
31
|
+
"solana-smart-wallet": {
|
|
32
|
+
adminSigner?: SolanaSignerInput;
|
|
33
|
+
linkedUser?: string;
|
|
34
|
+
};
|
|
35
|
+
"solana-mpc-wallet": {
|
|
36
|
+
linkedUser: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type { WalletTypeToArgs, WalletTypeToWallet };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRRJH2PAJcjs = require('../chunk-RRJH2PAJ.cjs');require('../chunk-EHPQ2A6Z.cjs');require('../chunk-F7GTDFYC.cjs');require('../chunk-XYHAZU5Y.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-6RTTEIHW.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-E2EM43SP.cjs');require('../chunk-C2WL57HT.cjs');require('../chunk-7PGV52LP.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-AHFMV7RZ.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-IUCH2YM2.cjs');require('../chunk-CK4JCQY6.cjs');exports.WalletFactory = _chunkRRJH2PAJcjs.a;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WalletTypeToArgs, WalletTypeToWallet } from './types.cjs';
|
|
2
|
+
import { ApiClient } from '../api/client.cjs';
|
|
3
|
+
import '../evm/wallet.cjs';
|
|
4
|
+
import '../api/gen/types.gen.cjs';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import '../evm/chains/index.cjs';
|
|
7
|
+
import '../solana/wallet.cjs';
|
|
8
|
+
import '@solana/web3.js';
|
|
9
|
+
import '../solana/tokens.cjs';
|
|
10
|
+
import '../solana/types/signers.cjs';
|
|
11
|
+
import '../solana/services/transactions-service.cjs';
|
|
12
|
+
import '../solana/services/approvals-service.cjs';
|
|
13
|
+
import '../solana/services/delegated-signers-service.cjs';
|
|
14
|
+
import '@crossmint/common-sdk-base';
|
|
15
|
+
|
|
16
|
+
declare class WalletFactory {
|
|
17
|
+
private readonly apiClient;
|
|
18
|
+
constructor(apiClient: ApiClient);
|
|
19
|
+
getOrCreateWallet<WalletType extends keyof WalletTypeToArgs>(type: WalletType, args: WalletTypeToArgs[WalletType]): Promise<WalletTypeToWallet[WalletType]>;
|
|
20
|
+
private assertCorrectWalletType;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { WalletFactory };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WalletTypeToArgs, WalletTypeToWallet } from './types.js';
|
|
2
|
+
import { ApiClient } from '../api/client.js';
|
|
3
|
+
import '../evm/wallet.js';
|
|
4
|
+
import '../api/gen/types.gen.js';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import '../evm/chains/index.js';
|
|
7
|
+
import '../solana/wallet.js';
|
|
8
|
+
import '@solana/web3.js';
|
|
9
|
+
import '../solana/tokens.js';
|
|
10
|
+
import '../solana/types/signers.js';
|
|
11
|
+
import '../solana/services/transactions-service.js';
|
|
12
|
+
import '../solana/services/approvals-service.js';
|
|
13
|
+
import '../solana/services/delegated-signers-service.js';
|
|
14
|
+
import '@crossmint/common-sdk-base';
|
|
15
|
+
|
|
16
|
+
declare class WalletFactory {
|
|
17
|
+
private readonly apiClient;
|
|
18
|
+
constructor(apiClient: ApiClient);
|
|
19
|
+
getOrCreateWallet<WalletType extends keyof WalletTypeToArgs>(type: WalletType, args: WalletTypeToArgs[WalletType]): Promise<WalletTypeToWallet[WalletType]>;
|
|
20
|
+
private assertCorrectWalletType;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { WalletFactory };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-AADORF6G.js";import"../chunk-QL7OSVKM.js";import"../chunk-SDH5CVH7.js";import"../chunk-6ZSPKEHA.js";import"../chunk-TYK4I7OU.js";import"../chunk-JGR6BPVQ.js";import"../chunk-ICVV5CBS.js";import"../chunk-6W35AARC.js";import"../chunk-K7ZLWZPC.js";import"../chunk-CGHMCYX6.js";import"../chunk-NZYUMZHK.js";import"../chunk-HKY6CBZC.js";import"../chunk-7Y2E7VNV.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-ASZ42HGR.js";import"../chunk-22GIA4MK.js";export{a as WalletFactory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-EHPQ2A6Z.cjs');require('../chunk-F7GTDFYC.cjs');var _chunkXYHAZU5Ycjs = require('../chunk-XYHAZU5Y.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-6RTTEIHW.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-E2EM43SP.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-IUCH2YM2.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunkXYHAZU5Ycjs.b; exports.SolanaSmartWallet = _chunkXYHAZU5Ycjs.a;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SolanaMPCWallet, SolanaSmartWallet } from './wallet.cjs';
|
|
2
|
+
export { SolanaSupportedToken } from './tokens.cjs';
|
|
3
|
+
import '../api/gen/types.gen.cjs';
|
|
4
|
+
import '@solana/web3.js';
|
|
5
|
+
import '../api/client.cjs';
|
|
6
|
+
import '@crossmint/common-sdk-base';
|
|
7
|
+
import 'viem';
|
|
8
|
+
import './types/signers.cjs';
|
|
9
|
+
import './services/transactions-service.cjs';
|
|
10
|
+
import './services/approvals-service.cjs';
|
|
11
|
+
import './services/delegated-signers-service.cjs';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SolanaMPCWallet, SolanaSmartWallet } from './wallet.js';
|
|
2
|
+
export { SolanaSupportedToken } from './tokens.js';
|
|
3
|
+
import '../api/gen/types.gen.js';
|
|
4
|
+
import '@solana/web3.js';
|
|
5
|
+
import '../api/client.js';
|
|
6
|
+
import '@crossmint/common-sdk-base';
|
|
7
|
+
import 'viem';
|
|
8
|
+
import './types/signers.js';
|
|
9
|
+
import './services/transactions-service.js';
|
|
10
|
+
import './services/approvals-service.js';
|
|
11
|
+
import './services/delegated-signers-service.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-QL7OSVKM.js";import"../chunk-SDH5CVH7.js";import{a,b}from"../chunk-6ZSPKEHA.js";import"../chunk-TYK4I7OU.js";import"../chunk-JGR6BPVQ.js";import"../chunk-ICVV5CBS.js";import"../chunk-6W35AARC.js";import"../chunk-K7ZLWZPC.js";import"../chunk-LX6WD7J6.js";import"../chunk-ASZ42HGR.js";import"../chunk-22GIA4MK.js";export{b as SolanaMPCWallet,a as SolanaSmartWallet};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGS3FTDMMcjs = require('../../chunk-GS3FTDMM.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaApprovalsService = _chunkGS3FTDMMcjs.a;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WalletsV1Alpha2TransactionResponseDto } from '../../api/gen/types.gen.cjs';
|
|
2
|
+
import { SolanaWalletLocator, ApiClient, CreateTransactionResponse } from '../../api/client.cjs';
|
|
3
|
+
import { SolanaNonCustodialSigner } from '../types/signers.cjs';
|
|
4
|
+
import '@crossmint/common-sdk-base';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import '@solana/web3.js';
|
|
7
|
+
|
|
8
|
+
type PendingApproval = NonNullable<NonNullable<CreateTransactionResponse["approvals"]>["pending"]>[number];
|
|
9
|
+
declare class SolanaApprovalsService {
|
|
10
|
+
private readonly walletLocator;
|
|
11
|
+
private readonly apiClient;
|
|
12
|
+
constructor(walletLocator: SolanaWalletLocator, apiClient: ApiClient);
|
|
13
|
+
approve(transactionId: string, pendingApprovals: Array<PendingApproval>, signers: Array<SolanaNonCustodialSigner>): Promise<WalletsV1Alpha2TransactionResponseDto>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SolanaApprovalsService };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WalletsV1Alpha2TransactionResponseDto } from '../../api/gen/types.gen.js';
|
|
2
|
+
import { SolanaWalletLocator, ApiClient, CreateTransactionResponse } from '../../api/client.js';
|
|
3
|
+
import { SolanaNonCustodialSigner } from '../types/signers.js';
|
|
4
|
+
import '@crossmint/common-sdk-base';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import '@solana/web3.js';
|
|
7
|
+
|
|
8
|
+
type PendingApproval = NonNullable<NonNullable<CreateTransactionResponse["approvals"]>["pending"]>[number];
|
|
9
|
+
declare class SolanaApprovalsService {
|
|
10
|
+
private readonly walletLocator;
|
|
11
|
+
private readonly apiClient;
|
|
12
|
+
constructor(walletLocator: SolanaWalletLocator, apiClient: ApiClient);
|
|
13
|
+
approve(transactionId: string, pendingApprovals: Array<PendingApproval>, signers: Array<SolanaNonCustodialSigner>): Promise<WalletsV1Alpha2TransactionResponseDto>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SolanaApprovalsService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-ICVV5CBS.js";import"../../chunk-22GIA4MK.js";export{a as SolanaApprovalsService};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFUHBLVE7cjs = require('../../chunk-FUHBLVE7.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaDelegatedSignerService = _chunkFUHBLVE7cjs.a;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DelegatedSignerDto } from '../../api/gen/types.gen.cjs';
|
|
2
|
+
import { SolanaWalletLocator, ApiClient } from '../../api/client.cjs';
|
|
3
|
+
import { SolanaTransactionsService } from './transactions-service.cjs';
|
|
4
|
+
import { SolanaNonCustodialSigner } from '../types/signers.cjs';
|
|
5
|
+
import '@crossmint/common-sdk-base';
|
|
6
|
+
import 'viem';
|
|
7
|
+
import '@solana/web3.js';
|
|
8
|
+
import './approvals-service.cjs';
|
|
9
|
+
|
|
10
|
+
declare class SolanaDelegatedSignerService {
|
|
11
|
+
private readonly walletLocator;
|
|
12
|
+
private readonly transactionsService;
|
|
13
|
+
private readonly apiClient;
|
|
14
|
+
constructor(walletLocator: SolanaWalletLocator, transactionsService: SolanaTransactionsService, apiClient: ApiClient);
|
|
15
|
+
registerDelegatedSigner(signer: string, adminSigner?: SolanaNonCustodialSigner): Promise<DelegatedSignerDto>;
|
|
16
|
+
getDelegatedSigner(signer: string): Promise<DelegatedSignerDto>;
|
|
17
|
+
removeDelegatedSigner(_address: string): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { SolanaDelegatedSignerService };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DelegatedSignerDto } from '../../api/gen/types.gen.js';
|
|
2
|
+
import { SolanaWalletLocator, ApiClient } from '../../api/client.js';
|
|
3
|
+
import { SolanaTransactionsService } from './transactions-service.js';
|
|
4
|
+
import { SolanaNonCustodialSigner } from '../types/signers.js';
|
|
5
|
+
import '@crossmint/common-sdk-base';
|
|
6
|
+
import 'viem';
|
|
7
|
+
import '@solana/web3.js';
|
|
8
|
+
import './approvals-service.js';
|
|
9
|
+
|
|
10
|
+
declare class SolanaDelegatedSignerService {
|
|
11
|
+
private readonly walletLocator;
|
|
12
|
+
private readonly transactionsService;
|
|
13
|
+
private readonly apiClient;
|
|
14
|
+
constructor(walletLocator: SolanaWalletLocator, transactionsService: SolanaTransactionsService, apiClient: ApiClient);
|
|
15
|
+
registerDelegatedSigner(signer: string, adminSigner?: SolanaNonCustodialSigner): Promise<DelegatedSignerDto>;
|
|
16
|
+
getDelegatedSigner(signer: string): Promise<DelegatedSignerDto>;
|
|
17
|
+
removeDelegatedSigner(_address: string): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { SolanaDelegatedSignerService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-TYK4I7OU.js";import"../../chunk-22GIA4MK.js";export{a as SolanaDelegatedSignerService};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6RTTEIHWcjs = require('../../chunk-6RTTEIHW.cjs');require('../../chunk-GS3FTDMM.cjs');require('../../chunk-DANM4IBF.cjs');require('../../chunk-IUCH2YM2.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaTransactionsService = _chunk6RTTEIHWcjs.a;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WalletsV1Alpha2TransactionsResponseDto } from '../../api/gen/types.gen.cjs';
|
|
2
|
+
import { SolanaWalletLocator, ApiClient } from '../../api/client.cjs';
|
|
3
|
+
import { SolanaNonCustodialSigner } from '../types/signers.cjs';
|
|
4
|
+
import { VersionedTransaction } from '@solana/web3.js';
|
|
5
|
+
import { SolanaApprovalsService } from './approvals-service.cjs';
|
|
6
|
+
import '@crossmint/common-sdk-base';
|
|
7
|
+
import 'viem';
|
|
8
|
+
|
|
9
|
+
declare class SolanaTransactionsService {
|
|
10
|
+
private readonly walletLocator;
|
|
11
|
+
private readonly apiClient;
|
|
12
|
+
private readonly approvalsService;
|
|
13
|
+
constructor(walletLocator: SolanaWalletLocator, apiClient: ApiClient, approvalsService?: SolanaApprovalsService);
|
|
14
|
+
createSignAndConfirm(params: {
|
|
15
|
+
transaction: VersionedTransaction;
|
|
16
|
+
signer?: SolanaNonCustodialSigner;
|
|
17
|
+
additionalSigners?: SolanaNonCustodialSigner[];
|
|
18
|
+
}): Promise<string>;
|
|
19
|
+
getTransactions(): Promise<WalletsV1Alpha2TransactionsResponseDto>;
|
|
20
|
+
approveTransaction(transactionId: string, signers: SolanaNonCustodialSigner[]): Promise<void>;
|
|
21
|
+
private create;
|
|
22
|
+
waitForTransaction(transactionId: string, timeoutMs?: number): Promise<string>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { SolanaTransactionsService };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WalletsV1Alpha2TransactionsResponseDto } from '../../api/gen/types.gen.js';
|
|
2
|
+
import { SolanaWalletLocator, ApiClient } from '../../api/client.js';
|
|
3
|
+
import { SolanaNonCustodialSigner } from '../types/signers.js';
|
|
4
|
+
import { VersionedTransaction } from '@solana/web3.js';
|
|
5
|
+
import { SolanaApprovalsService } from './approvals-service.js';
|
|
6
|
+
import '@crossmint/common-sdk-base';
|
|
7
|
+
import 'viem';
|
|
8
|
+
|
|
9
|
+
declare class SolanaTransactionsService {
|
|
10
|
+
private readonly walletLocator;
|
|
11
|
+
private readonly apiClient;
|
|
12
|
+
private readonly approvalsService;
|
|
13
|
+
constructor(walletLocator: SolanaWalletLocator, apiClient: ApiClient, approvalsService?: SolanaApprovalsService);
|
|
14
|
+
createSignAndConfirm(params: {
|
|
15
|
+
transaction: VersionedTransaction;
|
|
16
|
+
signer?: SolanaNonCustodialSigner;
|
|
17
|
+
additionalSigners?: SolanaNonCustodialSigner[];
|
|
18
|
+
}): Promise<string>;
|
|
19
|
+
getTransactions(): Promise<WalletsV1Alpha2TransactionsResponseDto>;
|
|
20
|
+
approveTransaction(transactionId: string, signers: SolanaNonCustodialSigner[]): Promise<void>;
|
|
21
|
+
private create;
|
|
22
|
+
waitForTransaction(transactionId: string, timeoutMs?: number): Promise<string>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { SolanaTransactionsService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-JGR6BPVQ.js";import"../../chunk-ICVV5CBS.js";import"../../chunk-LX6WD7J6.js";import"../../chunk-ASZ42HGR.js";import"../../chunk-22GIA4MK.js";export{a as SolanaTransactionsService};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('../chunk-F7GTDFYC.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-SDH5CVH7.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6XOH62PVcjs = require('../../chunk-6XOH62PV.cjs');require('../../chunk-CK4JCQY6.cjs');exports.isCustodialSigner = _chunk6XOH62PVcjs.b; exports.isNonCustodialSigner = _chunk6XOH62PVcjs.c; exports.parseSolanaNonCustodialSignerInput = _chunk6XOH62PVcjs.a; exports.parseSolanaSignerInput = _chunk6XOH62PVcjs.d;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Keypair, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
|
|
3
|
+
type SolanaAddress = string;
|
|
4
|
+
type SolanaKeypairSignerInput = {
|
|
5
|
+
type: "solana-keypair";
|
|
6
|
+
address: SolanaAddress;
|
|
7
|
+
signer: Keypair;
|
|
8
|
+
};
|
|
9
|
+
type SolanaExternalSignerInput = {
|
|
10
|
+
type: "solana-keypair";
|
|
11
|
+
address: SolanaAddress;
|
|
12
|
+
signer: {
|
|
13
|
+
signMessage: (message: Uint8Array) => Promise<Uint8Array>;
|
|
14
|
+
signTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type SolanaNonCustodialSignerInput = SolanaKeypairSignerInput | SolanaExternalSignerInput;
|
|
18
|
+
type SolanaCustodialSignerInput = {
|
|
19
|
+
type: "solana-fireblocks-custodial";
|
|
20
|
+
};
|
|
21
|
+
type SolanaSignerInput = SolanaNonCustodialSignerInput | SolanaCustodialSignerInput;
|
|
22
|
+
type SolanaNonCustodialSigner = {
|
|
23
|
+
type: "solana-keypair";
|
|
24
|
+
address: SolanaAddress;
|
|
25
|
+
signTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
26
|
+
signMessage: (message: Uint8Array) => Promise<Uint8Array>;
|
|
27
|
+
};
|
|
28
|
+
type SolanaCustodialSigner = {
|
|
29
|
+
type: "solana-fireblocks-custodial";
|
|
30
|
+
address?: SolanaAddress;
|
|
31
|
+
};
|
|
32
|
+
type SolanaSigner = SolanaNonCustodialSigner | SolanaCustodialSigner;
|
|
33
|
+
declare const parseSolanaNonCustodialSignerInput: (signerInput: SolanaNonCustodialSignerInput) => SolanaNonCustodialSigner;
|
|
34
|
+
declare const isCustodialSigner: (signer: SolanaSigner) => signer is SolanaCustodialSigner;
|
|
35
|
+
declare const isNonCustodialSigner: (signer: SolanaSigner) => signer is SolanaNonCustodialSigner;
|
|
36
|
+
declare const parseSolanaSignerInput: (signerInput: SolanaSignerInput) => SolanaSigner;
|
|
37
|
+
|
|
38
|
+
export { type SolanaAddress, type SolanaCustodialSigner, type SolanaCustodialSignerInput, type SolanaExternalSignerInput, type SolanaKeypairSignerInput, type SolanaNonCustodialSigner, type SolanaNonCustodialSignerInput, type SolanaSigner, type SolanaSignerInput, isCustodialSigner, isNonCustodialSigner, parseSolanaNonCustodialSignerInput, parseSolanaSignerInput };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Keypair, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
|
|
3
|
+
type SolanaAddress = string;
|
|
4
|
+
type SolanaKeypairSignerInput = {
|
|
5
|
+
type: "solana-keypair";
|
|
6
|
+
address: SolanaAddress;
|
|
7
|
+
signer: Keypair;
|
|
8
|
+
};
|
|
9
|
+
type SolanaExternalSignerInput = {
|
|
10
|
+
type: "solana-keypair";
|
|
11
|
+
address: SolanaAddress;
|
|
12
|
+
signer: {
|
|
13
|
+
signMessage: (message: Uint8Array) => Promise<Uint8Array>;
|
|
14
|
+
signTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type SolanaNonCustodialSignerInput = SolanaKeypairSignerInput | SolanaExternalSignerInput;
|
|
18
|
+
type SolanaCustodialSignerInput = {
|
|
19
|
+
type: "solana-fireblocks-custodial";
|
|
20
|
+
};
|
|
21
|
+
type SolanaSignerInput = SolanaNonCustodialSignerInput | SolanaCustodialSignerInput;
|
|
22
|
+
type SolanaNonCustodialSigner = {
|
|
23
|
+
type: "solana-keypair";
|
|
24
|
+
address: SolanaAddress;
|
|
25
|
+
signTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
26
|
+
signMessage: (message: Uint8Array) => Promise<Uint8Array>;
|
|
27
|
+
};
|
|
28
|
+
type SolanaCustodialSigner = {
|
|
29
|
+
type: "solana-fireblocks-custodial";
|
|
30
|
+
address?: SolanaAddress;
|
|
31
|
+
};
|
|
32
|
+
type SolanaSigner = SolanaNonCustodialSigner | SolanaCustodialSigner;
|
|
33
|
+
declare const parseSolanaNonCustodialSignerInput: (signerInput: SolanaNonCustodialSignerInput) => SolanaNonCustodialSigner;
|
|
34
|
+
declare const isCustodialSigner: (signer: SolanaSigner) => signer is SolanaCustodialSigner;
|
|
35
|
+
declare const isNonCustodialSigner: (signer: SolanaSigner) => signer is SolanaNonCustodialSigner;
|
|
36
|
+
declare const parseSolanaSignerInput: (signerInput: SolanaSignerInput) => SolanaSigner;
|
|
37
|
+
|
|
38
|
+
export { type SolanaAddress, type SolanaCustodialSigner, type SolanaCustodialSignerInput, type SolanaExternalSignerInput, type SolanaKeypairSignerInput, type SolanaNonCustodialSigner, type SolanaNonCustodialSignerInput, type SolanaSigner, type SolanaSignerInput, isCustodialSigner, isNonCustodialSigner, parseSolanaNonCustodialSignerInput, parseSolanaSignerInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d}from"../../chunk-6W35AARC.js";import"../../chunk-22GIA4MK.js";export{b as isCustodialSigner,c as isNonCustodialSigner,a as parseSolanaNonCustodialSignerInput,d as parseSolanaSignerInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkE2EM43SPcjs = require('../chunk-E2EM43SP.cjs');require('../chunk-CK4JCQY6.cjs');exports.getConnectionFromEnvironment = _chunkE2EM43SPcjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-K7ZLWZPC.js";import"../chunk-22GIA4MK.js";export{a as getConnectionFromEnvironment};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXYHAZU5Ycjs = require('../chunk-XYHAZU5Y.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-6RTTEIHW.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-E2EM43SP.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-IUCH2YM2.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunkXYHAZU5Ycjs.b; exports.SolanaSmartWallet = _chunkXYHAZU5Ycjs.a;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DelegatedSignerDto } from '../api/gen/types.gen.cjs';
|
|
2
|
+
import { PublicKey, Connection, VersionedTransaction } from '@solana/web3.js';
|
|
3
|
+
import { ApiClient, GetBalanceResponse, GetTransactionsResponse, GetNftsResponse, SolanaWalletLocator } from '../api/client.cjs';
|
|
4
|
+
import { SolanaSupportedToken } from './tokens.cjs';
|
|
5
|
+
import { SolanaSigner, SolanaSignerInput, SolanaNonCustodialSignerInput } from './types/signers.cjs';
|
|
6
|
+
import { SolanaTransactionsService } from './services/transactions-service.cjs';
|
|
7
|
+
import { SolanaDelegatedSignerService } from './services/delegated-signers-service.cjs';
|
|
8
|
+
import '@crossmint/common-sdk-base';
|
|
9
|
+
import 'viem';
|
|
10
|
+
import './services/approvals-service.cjs';
|
|
11
|
+
|
|
12
|
+
interface MPCTransactionParams {
|
|
13
|
+
transaction: VersionedTransaction;
|
|
14
|
+
additionalSigners?: SolanaNonCustodialSignerInput[];
|
|
15
|
+
}
|
|
16
|
+
interface SmartWalletTransactionParams {
|
|
17
|
+
transaction: VersionedTransaction;
|
|
18
|
+
additionalSigners?: SolanaNonCustodialSignerInput[];
|
|
19
|
+
delegatedSigner?: SolanaNonCustodialSignerInput;
|
|
20
|
+
}
|
|
21
|
+
declare abstract class SolanaWallet {
|
|
22
|
+
protected readonly apiClient: ApiClient;
|
|
23
|
+
protected readonly publicKey: PublicKey;
|
|
24
|
+
readonly client: {
|
|
25
|
+
public: Connection;
|
|
26
|
+
};
|
|
27
|
+
protected readonly transactionsService: SolanaTransactionsService;
|
|
28
|
+
protected readonly delegatedSignerService: SolanaDelegatedSignerService;
|
|
29
|
+
constructor(apiClient: ApiClient, publicKey: PublicKey, client?: {
|
|
30
|
+
public: Connection;
|
|
31
|
+
});
|
|
32
|
+
getPublicKey(): PublicKey;
|
|
33
|
+
getAddress(): string;
|
|
34
|
+
balances(tokens: SolanaSupportedToken[]): Promise<GetBalanceResponse>;
|
|
35
|
+
transactions(): Promise<GetTransactionsResponse>;
|
|
36
|
+
nfts(perPage: number, page: number): Promise<GetNftsResponse>;
|
|
37
|
+
protected get walletLocator(): SolanaWalletLocator;
|
|
38
|
+
}
|
|
39
|
+
declare class SolanaSmartWallet extends SolanaWallet {
|
|
40
|
+
readonly adminSigner: SolanaSigner;
|
|
41
|
+
constructor(apiClient: ApiClient, publicKey: PublicKey, adminSignerInput: SolanaSignerInput, client?: {
|
|
42
|
+
public: Connection;
|
|
43
|
+
});
|
|
44
|
+
sendTransaction(parameters: SmartWalletTransactionParams): Promise<string>;
|
|
45
|
+
addDelegatedSigner(signer: string): Promise<DelegatedSignerDto>;
|
|
46
|
+
private getEffectiveTransactionSigner;
|
|
47
|
+
}
|
|
48
|
+
declare class SolanaMPCWallet extends SolanaWallet {
|
|
49
|
+
sendTransaction(parameters: MPCTransactionParams): Promise<string>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { SolanaMPCWallet, SolanaSmartWallet };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DelegatedSignerDto } from '../api/gen/types.gen.js';
|
|
2
|
+
import { PublicKey, Connection, VersionedTransaction } from '@solana/web3.js';
|
|
3
|
+
import { ApiClient, GetBalanceResponse, GetTransactionsResponse, GetNftsResponse, SolanaWalletLocator } from '../api/client.js';
|
|
4
|
+
import { SolanaSupportedToken } from './tokens.js';
|
|
5
|
+
import { SolanaSigner, SolanaSignerInput, SolanaNonCustodialSignerInput } from './types/signers.js';
|
|
6
|
+
import { SolanaTransactionsService } from './services/transactions-service.js';
|
|
7
|
+
import { SolanaDelegatedSignerService } from './services/delegated-signers-service.js';
|
|
8
|
+
import '@crossmint/common-sdk-base';
|
|
9
|
+
import 'viem';
|
|
10
|
+
import './services/approvals-service.js';
|
|
11
|
+
|
|
12
|
+
interface MPCTransactionParams {
|
|
13
|
+
transaction: VersionedTransaction;
|
|
14
|
+
additionalSigners?: SolanaNonCustodialSignerInput[];
|
|
15
|
+
}
|
|
16
|
+
interface SmartWalletTransactionParams {
|
|
17
|
+
transaction: VersionedTransaction;
|
|
18
|
+
additionalSigners?: SolanaNonCustodialSignerInput[];
|
|
19
|
+
delegatedSigner?: SolanaNonCustodialSignerInput;
|
|
20
|
+
}
|
|
21
|
+
declare abstract class SolanaWallet {
|
|
22
|
+
protected readonly apiClient: ApiClient;
|
|
23
|
+
protected readonly publicKey: PublicKey;
|
|
24
|
+
readonly client: {
|
|
25
|
+
public: Connection;
|
|
26
|
+
};
|
|
27
|
+
protected readonly transactionsService: SolanaTransactionsService;
|
|
28
|
+
protected readonly delegatedSignerService: SolanaDelegatedSignerService;
|
|
29
|
+
constructor(apiClient: ApiClient, publicKey: PublicKey, client?: {
|
|
30
|
+
public: Connection;
|
|
31
|
+
});
|
|
32
|
+
getPublicKey(): PublicKey;
|
|
33
|
+
getAddress(): string;
|
|
34
|
+
balances(tokens: SolanaSupportedToken[]): Promise<GetBalanceResponse>;
|
|
35
|
+
transactions(): Promise<GetTransactionsResponse>;
|
|
36
|
+
nfts(perPage: number, page: number): Promise<GetNftsResponse>;
|
|
37
|
+
protected get walletLocator(): SolanaWalletLocator;
|
|
38
|
+
}
|
|
39
|
+
declare class SolanaSmartWallet extends SolanaWallet {
|
|
40
|
+
readonly adminSigner: SolanaSigner;
|
|
41
|
+
constructor(apiClient: ApiClient, publicKey: PublicKey, adminSignerInput: SolanaSignerInput, client?: {
|
|
42
|
+
public: Connection;
|
|
43
|
+
});
|
|
44
|
+
sendTransaction(parameters: SmartWalletTransactionParams): Promise<string>;
|
|
45
|
+
addDelegatedSigner(signer: string): Promise<DelegatedSignerDto>;
|
|
46
|
+
private getEffectiveTransactionSigner;
|
|
47
|
+
}
|
|
48
|
+
declare class SolanaMPCWallet extends SolanaWallet {
|
|
49
|
+
sendTransaction(parameters: MPCTransactionParams): Promise<string>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { SolanaMPCWallet, SolanaSmartWallet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunk-6ZSPKEHA.js";import"../chunk-TYK4I7OU.js";import"../chunk-JGR6BPVQ.js";import"../chunk-ICVV5CBS.js";import"../chunk-6W35AARC.js";import"../chunk-K7ZLWZPC.js";import"../chunk-LX6WD7J6.js";import"../chunk-ASZ42HGR.js";import"../chunk-22GIA4MK.js";export{b as SolanaMPCWallet,a as SolanaSmartWallet};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIUCH2YM2cjs = require('../chunk-IUCH2YM2.cjs');require('../chunk-CK4JCQY6.cjs');exports.ENTRY_POINT_ADDRESS = _chunkIUCH2YM2cjs.d; exports.SDK_NAME = _chunkIUCH2YM2cjs.c; exports.SDK_VERSION = _chunkIUCH2YM2cjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkIUCH2YM2cjs.e; exports.WALLETS_SERVICE = _chunkIUCH2YM2cjs.a;
|