@crossmint/wallets-sdk 0.10.7 → 0.10.9
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 +38 -114
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/gen/index.cjs +1 -1
- package/dist/api/gen/index.js +1 -1
- package/dist/api/gen/types.gen.d.cts +3 -1
- package/dist/api/gen/types.gen.d.ts +3 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.js +1 -1
- package/dist/chunk-2LOGLK6Y.js +1 -0
- package/dist/{chunk-6OI4IYFQ.js → chunk-36Z3WOLW.js} +1 -1
- package/dist/chunk-3KB2VQVH.js +1 -0
- package/dist/{chunk-X3I2D4JM.cjs → chunk-5HBL6I5V.cjs} +1 -1
- package/dist/{chunk-7XGEKCEC.cjs → chunk-5IM7I7EX.cjs} +1 -1
- package/dist/chunk-5XUQSU22.js +1 -0
- package/dist/chunk-63KMVANB.cjs +1 -0
- package/dist/chunk-6DVCB4VI.cjs +1 -0
- package/dist/{chunk-RQLYLJLG.js → chunk-6YFK33UZ.js} +1 -1
- package/dist/{chunk-Q4AUF52K.js → chunk-7KHMZPZO.js} +1 -1
- package/dist/{chunk-KHTMC3YP.cjs → chunk-AHG6IQT7.cjs} +1 -1
- package/dist/chunk-C7GUSH3M.js +1 -0
- package/dist/chunk-CGAFBZHZ.cjs +1 -0
- package/dist/{chunk-4Y3GRDSC.js → chunk-CTZE2MXB.js} +1 -1
- package/dist/{chunk-S4BVVCCI.cjs → chunk-FBNQVPXQ.cjs} +1 -1
- package/dist/chunk-FWMSAG7V.cjs +1 -0
- package/dist/chunk-GEEQGXHO.cjs +1 -0
- package/dist/{chunk-Y4JKM3NU.js → chunk-KBBVSGHP.js} +1 -1
- package/dist/chunk-MHBF3VBC.js +1 -0
- package/dist/{chunk-4SOUJYEZ.cjs → chunk-MPTRSUNX.cjs} +1 -1
- package/dist/{chunk-MWG57IBW.cjs → chunk-NGODR2AA.cjs} +1 -1
- package/dist/{chunk-EFV6LYBX.cjs → chunk-NWOKSI3V.cjs} +1 -1
- package/dist/{chunk-KT3YIMGI.js → chunk-PHIPQLW2.js} +1 -1
- package/dist/chunk-PPTGFYIV.js +1 -0
- package/dist/{chunk-PCATIT6D.js → chunk-RSM6MX6W.js} +1 -1
- package/dist/{chunk-YRRIQQ37.cjs → chunk-UMX5PW5P.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -9
- package/dist/index.d.ts +8 -9
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +8 -8
- package/dist/sdk.d.ts +8 -8
- package/dist/sdk.js +1 -1
- package/dist/signers/email/email-iframe-manager.cjs +1 -1
- package/dist/signers/email/email-iframe-manager.js +1 -1
- package/dist/signers/email/email-signer-api-client.cjs +1 -1
- package/dist/signers/email/email-signer-api-client.js +1 -1
- package/dist/signers/email/email-signer.cjs +1 -1
- package/dist/signers/email/email-signer.js +1 -1
- package/dist/signers/email/evm-email-signer.cjs +1 -1
- package/dist/signers/email/evm-email-signer.js +1 -1
- package/dist/signers/email/index.cjs +1 -1
- package/dist/signers/email/index.js +1 -1
- package/dist/signers/email/solana-email-signer.cjs +1 -1
- package/dist/signers/email/solana-email-signer.js +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.d.cts +7 -2
- package/dist/wallets/evm.d.ts +7 -2
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.d.cts +8 -2
- package/dist/wallets/solana.d.ts +8 -2
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/types.cjs +1 -1
- package/dist/wallets/types.d.cts +42 -9
- package/dist/wallets/types.d.ts +42 -9
- package/dist/wallets/types.js +0 -1
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +4 -9
- package/dist/wallets/wallet-factory.d.ts +4 -9
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +13 -5
- package/dist/wallets/wallet.d.ts +13 -5
- package/dist/wallets/wallet.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-3BJP6F4A.cjs +0 -1
- package/dist/chunk-4ZGDFV6E.cjs +0 -1
- package/dist/chunk-DBRGHBUB.js +0 -1
- package/dist/chunk-EOBI2HWM.js +0 -1
- package/dist/chunk-GK2NFDT2.js +0 -1
- package/dist/chunk-IWRAIG3I.js +0 -1
- package/dist/chunk-IWXXXIDH.cjs +0 -1
- package/dist/chunk-MGEPGAO4.cjs +0 -1
- package/dist/chunk-MHKWLGN5.cjs +0 -1
- package/dist/chunk-MIR5F4R2.js +0 -1
- package/dist/chunk-PDL3XF5M.js +0 -1
- package/dist/chunk-PJUVPRKB.js +0 -0
- package/dist/chunk-ZWDS66FS.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t}from"./chunk-BW7YYVZE.js";import{IFrameWindow as a}from"@crossmint/client-sdk-window";import{environmentUrlConfig as s,signerInboundEvents as m,signerOutboundEvents as h}from"@crossmint/client-signers";var i=class{constructor(n){this.config=n;this.handshakeParent=null}initialize(){return t(this,null,function*(){if(this.handshakeParent)return this.handshakeParent;let n=new URL(s[this.config.environment]);n.searchParams.set("targetOrigin",window.location.origin);let e=yield this.createInvisibleIFrame(n.toString());return this.handshakeParent=yield a.init(e,{targetOrigin:n.origin,incomingEvents:h,outgoingEvents:m}),yield this.handshakeParent.handshakeWithChild(),this.handshakeParent})}createInvisibleIFrame(n){return t(this,null,function*(){let e=document.createElement("iframe");return e.src=n,Object.assign(e.style,{position:"absolute",opacity:"0",pointerEvents:"none",width:"0",height:"0",border:"none",top:"-9999px",left:"-9999px"}),new Promise((r,o)=>{e.onload=()=>r(e),e.onerror=()=>o(new Error("Failed to load iframe content")),document.body.appendChild(e)})})}};export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-PHIPQLW2.js";import{a as c,b as g}from"./chunk-7KHMZPZO.js";import{f as s}from"./chunk-BW7YYVZE.js";import{VersionedTransaction as y}from"@solana/web3.js";import l from"bs58";var m=class p extends c{constructor(e){super(e)}locator(){return`solana-keypair:${this.config.signerAddress}`}signMessage(){return s(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return s(this,null,function*(){var a;yield this.handleAuthRequired();let n=this.getJwtOrThrow(),i=l.decode(e),t=y.deserialize(i).message.serialize(),r=yield(a=this.config.clientTEEConnection)==null?void 0:a.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:n,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:l.encode(t),encoding:"base58"}},options:g});if((r==null?void 0:r.status)==="error")throw new Error(r.error);if((r==null?void 0:r.signature)==null)throw new Error("Failed to sign transaction");return p.verifyPublicKeyFormat(r.publicKey),{signature:r.signature.bytes}})}static pregenerateSigner(e,n){return s(this,null,function*(){var o;let i=e!=null?e:(o=n.experimental_customAuth)==null?void 0:o.email;if(i==null)throw new Error("Email is required to pregenerate a signer");try{let r=(yield new d(n).pregenerateSigner(i,"ed25519")).publicKey;return this.verifyPublicKeyFormat(r),r.bytes}catch(t){throw console.error("[EmailSigner] Failed to pregenerate signer:",t),t}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMPTRSUNXcjs = require('./chunk-MPTRSUNX.cjs');var _chunkNWOKSI3Vcjs = require('./chunk-NWOKSI3V.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _web3js = require('@solana/web3.js');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var m=class p extends _chunkNWOKSI3Vcjs.a{constructor(e){super(e)}locator(){return`solana-keypair:${this.config.signerAddress}`}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var a;yield this.handleAuthRequired();let n=this.getJwtOrThrow(),i=_bs582.default.decode(e),t=_web3js.VersionedTransaction.deserialize(i).message.serialize(),r=yield(a=this.config.clientTEEConnection)==null?void 0:a.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:n,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:_bs582.default.encode(t),encoding:"base58"}},options:_chunkNWOKSI3Vcjs.b});if((r==null?void 0:r.status)==="error")throw new Error(r.error);if((r==null?void 0:r.signature)==null)throw new Error("Failed to sign transaction");return p.verifyPublicKeyFormat(r.publicKey),{signature:r.signature.bytes}})}static pregenerateSigner(e,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var o;let i=e!=null?e:(o=n.experimental_customAuth)==null?void 0:o.email;if(i==null)throw new Error("Email is required to pregenerate a signer");try{let r=(yield new (0, _chunkMPTRSUNXcjs.a)(n).pregenerateSigner(i,"ed25519")).publicKey;return this.verifyPublicKeyFormat(r),r.bytes}catch(t){throw console.error("[EmailSigner] Failed to pregenerate signer:",t),t}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}};exports.a = m;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCGAFBZHZcjs = require('./chunk-CGAFBZHZ.cjs');var _chunk63KMVANBcjs = require('./chunk-63KMVANB.cjs');var _chunkFBNQVPXQcjs = require('./chunk-FBNQVPXQ.cjs');require('./chunk-6DVCB4VI.cjs');var _chunkGEEQGXHOcjs = require('./chunk-GEEQGXHO.cjs');require('./chunk-5IM7I7EX.cjs');require('./chunk-VMEGMTOD.cjs');require('./chunk-UMX5PW5P.cjs');require('./chunk-NGODR2AA.cjs');require('./chunk-MPTRSUNX.cjs');require('./chunk-NWOKSI3V.cjs');require('./chunk-FWMSAG7V.cjs');require('./chunk-DYRSQN7X.cjs');require('./chunk-NVJN7LPY.cjs');require('./chunk-AFYBD7FI.cjs');require('./chunk-ZSWIQU3U.cjs');require('./chunk-RD5PG4M6.cjs');require('./chunk-6HXIZLEQ.cjs');var _chunk5HBL6I5Vcjs = require('./chunk-5HBL6I5V.cjs');require('./chunk-AHG6IQT7.cjs');require('./chunk-CT2UGJEL.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-6VJEBYPN.cjs');require('./chunk-IR5WN6FQ.cjs');require('./chunk-GEY574TH.cjs');require('./chunk-YO6BJ2DI.cjs');require('./chunk-DIZVZP5P.cjs');require('./chunk-XALFCQKD.cjs');exports.CrossmintWallets = _chunkFBNQVPXQcjs.b; exports.EVMWallet = _chunkCGAFBZHZcjs.a; exports.SolanaWallet = _chunk63KMVANBcjs.a; exports.Wallet = _chunkGEEQGXHOcjs.a; exports.WalletsApiClient = _chunk5HBL6I5Vcjs.a; exports.createCrossmint = _chunkFBNQVPXQcjs.a;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
export { CrossmintWallets } from './sdk.cjs';
|
|
2
|
-
export {
|
|
2
|
+
export { ApiClient as WalletsApiClient } from './api/client.cjs';
|
|
3
|
+
export { Activity } from './api/types.cjs';
|
|
3
4
|
export { Wallet } from './wallets/wallet.cjs';
|
|
4
|
-
export { WalletArgsFor, WalletFactory } from './wallets/wallet-factory.cjs';
|
|
5
5
|
export { SolanaWallet } from './wallets/solana.cjs';
|
|
6
6
|
export { EVMWallet } from './wallets/evm.cjs';
|
|
7
|
-
export { Balances,
|
|
8
|
-
export { Chain, EVMChain,
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
|
|
7
|
+
export { Balances, DelegatedSigner, EVMTransactionInput, SolanaTransactionInput, Transaction, WalletArgsFor } from './wallets/types.cjs';
|
|
8
|
+
export { Chain, EVMChain, SolanaChain } from './chains/chains.cjs';
|
|
9
|
+
export { EmailSignerConfig, ExternalWalletSignerConfigForChain, SignerConfigForChain } from './signers/types.cjs';
|
|
10
|
+
export { EvmExternalWalletSignerConfig, SolanaExternalWalletSignerConfig, createCrossmint } from '@crossmint/common-sdk-base';
|
|
11
|
+
import 'viem';
|
|
12
12
|
import './api/gen/types.gen.cjs';
|
|
13
|
-
import './api/client.cjs';
|
|
14
13
|
import 'viem/_types/actions/siwe/verifySiweMessage';
|
|
15
14
|
import 'viem/_types/actions/public/simulateCalls';
|
|
16
15
|
import 'viem/_types/actions/public/simulateBlocks';
|
|
17
16
|
import 'viem/_types/actions/public/createAccessList';
|
|
18
|
-
import 'viem';
|
|
19
17
|
import '@solana/web3.js';
|
|
20
18
|
import '@crossmint/client-sdk-window';
|
|
21
19
|
import '@crossmint/client-signers';
|
|
20
|
+
import 'abitype';
|
|
22
21
|
import 'ox';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
export { CrossmintWallets } from './sdk.js';
|
|
2
|
-
export {
|
|
2
|
+
export { ApiClient as WalletsApiClient } from './api/client.js';
|
|
3
|
+
export { Activity } from './api/types.js';
|
|
3
4
|
export { Wallet } from './wallets/wallet.js';
|
|
4
|
-
export { WalletArgsFor, WalletFactory } from './wallets/wallet-factory.js';
|
|
5
5
|
export { SolanaWallet } from './wallets/solana.js';
|
|
6
6
|
export { EVMWallet } from './wallets/evm.js';
|
|
7
|
-
export { Balances,
|
|
8
|
-
export { Chain, EVMChain,
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
|
|
7
|
+
export { Balances, DelegatedSigner, EVMTransactionInput, SolanaTransactionInput, Transaction, WalletArgsFor } from './wallets/types.js';
|
|
8
|
+
export { Chain, EVMChain, SolanaChain } from './chains/chains.js';
|
|
9
|
+
export { EmailSignerConfig, ExternalWalletSignerConfigForChain, SignerConfigForChain } from './signers/types.js';
|
|
10
|
+
export { EvmExternalWalletSignerConfig, SolanaExternalWalletSignerConfig, createCrossmint } from '@crossmint/common-sdk-base';
|
|
11
|
+
import 'viem';
|
|
12
12
|
import './api/gen/types.gen.js';
|
|
13
|
-
import './api/client.js';
|
|
14
13
|
import 'viem/_types/actions/siwe/verifySiweMessage';
|
|
15
14
|
import 'viem/_types/actions/public/simulateCalls';
|
|
16
15
|
import 'viem/_types/actions/public/simulateBlocks';
|
|
17
16
|
import 'viem/_types/actions/public/createAccessList';
|
|
18
|
-
import 'viem';
|
|
19
17
|
import '@solana/web3.js';
|
|
20
18
|
import '@crossmint/client-sdk-window';
|
|
21
19
|
import '@crossmint/client-signers';
|
|
20
|
+
import 'abitype';
|
|
22
21
|
import 'ox';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk-MHBF3VBC.js";import{a as r}from"./chunk-2LOGLK6Y.js";import{a as n,b as t}from"./chunk-KBBVSGHP.js";import"./chunk-C7GUSH3M.js";import{a}from"./chunk-5XUQSU22.js";import"./chunk-CTZE2MXB.js";import"./chunk-TN6YXWPL.js";import"./chunk-RSM6MX6W.js";import"./chunk-6YFK33UZ.js";import"./chunk-PHIPQLW2.js";import"./chunk-7KHMZPZO.js";import"./chunk-PPTGFYIV.js";import"./chunk-OV4CFQ36.js";import"./chunk-77QBSFHG.js";import"./chunk-T3ICQDFS.js";import"./chunk-M4ELAV7U.js";import"./chunk-FUUYGB4K.js";import"./chunk-5IFDVB4Y.js";import{a as e}from"./chunk-36Z3WOLW.js";import"./chunk-3KB2VQVH.js";import"./chunk-7ENJXL4H.js";import"./chunk-KBJA7JDT.js";import"./chunk-BJDS5BJG.js";import"./chunk-KKQBZXFE.js";import"./chunk-S3DYQVRD.js";import"./chunk-2KK65AC6.js";import"./chunk-QTSZSHKK.js";import"./chunk-BW7YYVZE.js";export{t as CrossmintWallets,o as EVMWallet,r as SolanaWallet,a as Wallet,e as WalletsApiClient,n as createCrossmint};
|
package/dist/sdk.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFBNQVPXQcjs = require('./chunk-FBNQVPXQ.cjs');require('./chunk-6DVCB4VI.cjs');require('./chunk-GEEQGXHO.cjs');require('./chunk-5IM7I7EX.cjs');require('./chunk-VMEGMTOD.cjs');require('./chunk-UMX5PW5P.cjs');require('./chunk-NGODR2AA.cjs');require('./chunk-MPTRSUNX.cjs');require('./chunk-NWOKSI3V.cjs');require('./chunk-FWMSAG7V.cjs');require('./chunk-DYRSQN7X.cjs');require('./chunk-NVJN7LPY.cjs');require('./chunk-AFYBD7FI.cjs');require('./chunk-ZSWIQU3U.cjs');require('./chunk-RD5PG4M6.cjs');require('./chunk-6HXIZLEQ.cjs');require('./chunk-5HBL6I5V.cjs');require('./chunk-AHG6IQT7.cjs');require('./chunk-CT2UGJEL.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-YO6BJ2DI.cjs');require('./chunk-DIZVZP5P.cjs');require('./chunk-XALFCQKD.cjs');exports.CrossmintWallets = _chunkFBNQVPXQcjs.b; exports.createCrossmint = _chunkFBNQVPXQcjs.a;
|
package/dist/sdk.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import { WalletArgsFor } from './wallets/wallet-factory.cjs';
|
|
4
3
|
import { Wallet } from './wallets/wallet.cjs';
|
|
5
4
|
import { Chain } from './chains/chains.cjs';
|
|
6
|
-
import './
|
|
7
|
-
import './api/types.cjs';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import './api/gen/types.gen.cjs';
|
|
5
|
+
import { WalletArgsFor } from './wallets/types.cjs';
|
|
10
6
|
import './signers/types.cjs';
|
|
11
7
|
import 'ox';
|
|
12
8
|
import '@crossmint/client-sdk-window';
|
|
13
9
|
import '@crossmint/client-signers';
|
|
14
|
-
import './
|
|
10
|
+
import './api/gen/types.gen.cjs';
|
|
11
|
+
import './api/client.cjs';
|
|
12
|
+
import './api/types.cjs';
|
|
13
|
+
import 'viem';
|
|
15
14
|
import '@solana/web3.js';
|
|
15
|
+
import 'abitype';
|
|
16
16
|
|
|
17
17
|
declare class CrossmintWallets {
|
|
18
18
|
private readonly walletFactory;
|
|
@@ -27,14 +27,14 @@ declare class CrossmintWallets {
|
|
|
27
27
|
* Get or create a wallet, can only be called on the client side
|
|
28
28
|
* @param args - Wallet data
|
|
29
29
|
* @param options - Wallet options
|
|
30
|
-
* @returns
|
|
30
|
+
* @returns An existing wallet or a new wallet
|
|
31
31
|
*/
|
|
32
32
|
getOrCreateWallet<C extends Chain>(options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
33
33
|
/**
|
|
34
34
|
* Get an existing wallet by its locator, can only be called on the server side
|
|
35
35
|
* @param walletLocator - Wallet locator
|
|
36
36
|
* @param options - Wallet options
|
|
37
|
-
* @returns A wallet
|
|
37
|
+
* @returns A wallet if found, throws WalletNotAvailableError if not found
|
|
38
38
|
*/
|
|
39
39
|
getWallet<C extends Chain>(walletLocator: string, options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
40
40
|
/**
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import { WalletArgsFor } from './wallets/wallet-factory.js';
|
|
4
3
|
import { Wallet } from './wallets/wallet.js';
|
|
5
4
|
import { Chain } from './chains/chains.js';
|
|
6
|
-
import './
|
|
7
|
-
import './api/types.js';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import './api/gen/types.gen.js';
|
|
5
|
+
import { WalletArgsFor } from './wallets/types.js';
|
|
10
6
|
import './signers/types.js';
|
|
11
7
|
import 'ox';
|
|
12
8
|
import '@crossmint/client-sdk-window';
|
|
13
9
|
import '@crossmint/client-signers';
|
|
14
|
-
import './
|
|
10
|
+
import './api/gen/types.gen.js';
|
|
11
|
+
import './api/client.js';
|
|
12
|
+
import './api/types.js';
|
|
13
|
+
import 'viem';
|
|
15
14
|
import '@solana/web3.js';
|
|
15
|
+
import 'abitype';
|
|
16
16
|
|
|
17
17
|
declare class CrossmintWallets {
|
|
18
18
|
private readonly walletFactory;
|
|
@@ -27,14 +27,14 @@ declare class CrossmintWallets {
|
|
|
27
27
|
* Get or create a wallet, can only be called on the client side
|
|
28
28
|
* @param args - Wallet data
|
|
29
29
|
* @param options - Wallet options
|
|
30
|
-
* @returns
|
|
30
|
+
* @returns An existing wallet or a new wallet
|
|
31
31
|
*/
|
|
32
32
|
getOrCreateWallet<C extends Chain>(options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
33
33
|
/**
|
|
34
34
|
* Get an existing wallet by its locator, can only be called on the server side
|
|
35
35
|
* @param walletLocator - Wallet locator
|
|
36
36
|
* @param options - Wallet options
|
|
37
|
-
* @returns A wallet
|
|
37
|
+
* @returns A wallet if found, throws WalletNotAvailableError if not found
|
|
38
38
|
*/
|
|
39
39
|
getWallet<C extends Chain>(walletLocator: string, options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
40
40
|
/**
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-KBBVSGHP.js";import"./chunk-C7GUSH3M.js";import"./chunk-5XUQSU22.js";import"./chunk-CTZE2MXB.js";import"./chunk-TN6YXWPL.js";import"./chunk-RSM6MX6W.js";import"./chunk-6YFK33UZ.js";import"./chunk-PHIPQLW2.js";import"./chunk-7KHMZPZO.js";import"./chunk-PPTGFYIV.js";import"./chunk-OV4CFQ36.js";import"./chunk-77QBSFHG.js";import"./chunk-T3ICQDFS.js";import"./chunk-M4ELAV7U.js";import"./chunk-FUUYGB4K.js";import"./chunk-5IFDVB4Y.js";import"./chunk-36Z3WOLW.js";import"./chunk-3KB2VQVH.js";import"./chunk-7ENJXL4H.js";import"./chunk-KBJA7JDT.js";import"./chunk-2KK65AC6.js";import"./chunk-QTSZSHKK.js";import"./chunk-BW7YYVZE.js";export{b as CrossmintWallets,a as createCrossmint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFWMSAG7Vcjs = require('../../chunk-FWMSAG7V.cjs');require('../../chunk-XALFCQKD.cjs');exports.EmailIframeManager = _chunkFWMSAG7Vcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PPTGFYIV.js";import"../../chunk-BW7YYVZE.js";export{a as EmailIframeManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMPTRSUNXcjs = require('../../chunk-MPTRSUNX.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.EmailSignerApiClient = _chunkMPTRSUNXcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PHIPQLW2.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as EmailSignerApiClient};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNWOKSI3Vcjs = require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-XALFCQKD.cjs');exports.DEFAULT_EVENT_OPTIONS = _chunkNWOKSI3Vcjs.b; exports.EmailSigner = _chunkNWOKSI3Vcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-BW7YYVZE.js";export{b as DEFAULT_EVENT_OPTIONS,a as EmailSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNGODR2AAcjs = require('../../chunk-NGODR2AA.cjs');require('../../chunk-MPTRSUNX.cjs');require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.EvmEmailSigner = _chunkNGODR2AAcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-6YFK33UZ.js";import"../../chunk-PHIPQLW2.js";import"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as EvmEmailSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-VMEGMTOD.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-VMEGMTOD.cjs');var _chunkUMX5PW5Pcjs = require('../../chunk-UMX5PW5P.cjs');var _chunkNGODR2AAcjs = require('../../chunk-NGODR2AA.cjs');require('../../chunk-MPTRSUNX.cjs');var _chunkNWOKSI3Vcjs = require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.DEFAULT_EVENT_OPTIONS = _chunkNWOKSI3Vcjs.b; exports.EmailSigner = _chunkNWOKSI3Vcjs.a; exports.EvmEmailSigner = _chunkNGODR2AAcjs.a; exports.SolanaEmailSigner = _chunkUMX5PW5Pcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-TN6YXWPL.js";import{a as c}from"../../chunk-
|
|
1
|
+
import"../../chunk-TN6YXWPL.js";import{a as c}from"../../chunk-RSM6MX6W.js";import{a as d}from"../../chunk-6YFK33UZ.js";import"../../chunk-PHIPQLW2.js";import{a,b}from"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{b as DEFAULT_EVENT_OPTIONS,a as EmailSigner,d as EvmEmailSigner,c as SolanaEmailSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUMX5PW5Pcjs = require('../../chunk-UMX5PW5P.cjs');require('../../chunk-MPTRSUNX.cjs');require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.SolanaEmailSigner = _chunkUMX5PW5Pcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-RSM6MX6W.js";import"../../chunk-PHIPQLW2.js";import"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as SolanaEmailSigner};
|
package/dist/signers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5IM7I7EXcjs = require('../chunk-5IM7I7EX.cjs');require('../chunk-VMEGMTOD.cjs');require('../chunk-UMX5PW5P.cjs');require('../chunk-NGODR2AA.cjs');require('../chunk-MPTRSUNX.cjs');require('../chunk-NWOKSI3V.cjs');require('../chunk-FWMSAG7V.cjs');require('../chunk-DYRSQN7X.cjs');require('../chunk-NVJN7LPY.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-YO6BJ2DI.cjs');require('../chunk-DIZVZP5P.cjs');require('../chunk-XALFCQKD.cjs');exports.assembleSigner = _chunk5IM7I7EXcjs.a;
|
package/dist/signers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-CTZE2MXB.js";import"../chunk-TN6YXWPL.js";import"../chunk-RSM6MX6W.js";import"../chunk-6YFK33UZ.js";import"../chunk-PHIPQLW2.js";import"../chunk-7KHMZPZO.js";import"../chunk-PPTGFYIV.js";import"../chunk-OV4CFQ36.js";import"../chunk-77QBSFHG.js";import"../chunk-T3ICQDFS.js";import"../chunk-M4ELAV7U.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-2KK65AC6.js";import"../chunk-QTSZSHKK.js";import"../chunk-BW7YYVZE.js";export{a as assembleSigner};
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAHG6IQT7cjs = require('../chunk-AHG6IQT7.cjs');require('../chunk-XALFCQKD.cjs');exports.SDK_NAME = _chunkAHG6IQT7cjs.c; exports.SDK_VERSION = _chunkAHG6IQT7cjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkAHG6IQT7cjs.d; exports.WALLETS_SERVICE = _chunkAHG6IQT7cjs.a;
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-3KB2VQVH.js";import"../chunk-BW7YYVZE.js";export{c as SDK_NAME,b as SDK_VERSION,d as STATUS_POLLING_INTERVAL_MS,a as WALLETS_SERVICE};
|
package/dist/wallets/evm.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCGAFBZHZcjs = require('../chunk-CGAFBZHZ.cjs');require('../chunk-GEEQGXHO.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-6VJEBYPN.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-XALFCQKD.cjs');exports.EVMWallet = _chunkCGAFBZHZcjs.a;
|
package/dist/wallets/evm.d.cts
CHANGED
|
@@ -10,6 +10,7 @@ import { Wallet } from './wallet.cjs';
|
|
|
10
10
|
import '@solana/web3.js';
|
|
11
11
|
import '@crossmint/client-sdk-window';
|
|
12
12
|
import '@crossmint/client-signers';
|
|
13
|
+
import 'abitype';
|
|
13
14
|
import '../api/types.cjs';
|
|
14
15
|
import '../api/gen/types.gen.cjs';
|
|
15
16
|
import '../signers/types.cjs';
|
|
@@ -20,9 +21,11 @@ import '../api/client.cjs';
|
|
|
20
21
|
declare class EVMWallet extends Wallet<EVMChain> {
|
|
21
22
|
constructor(wallet: Wallet<EVMChain>);
|
|
22
23
|
static from(wallet: Wallet<Chain>): EVMWallet;
|
|
23
|
-
sendTransaction(params:
|
|
24
|
+
sendTransaction<T extends EVMTransactionInput>(params: T): Promise<Transaction<T["options"] extends {
|
|
25
|
+
experimental_prepareOnly: true;
|
|
26
|
+
} ? true : false>>;
|
|
24
27
|
signMessage(message: string): Promise<string>;
|
|
25
|
-
|
|
28
|
+
signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(params: TypedDataDefinition<typedData, primaryType> & {
|
|
26
29
|
chain: EVMSmartWalletChain;
|
|
27
30
|
}): Promise<string>;
|
|
28
31
|
getViemClient(params?: {
|
|
@@ -129,6 +132,8 @@ declare class EVMWallet extends Wallet<EVMChain> {
|
|
|
129
132
|
uid?: undefined;
|
|
130
133
|
} ? viem.PublicActions<HttpTransport, viem.Chain> : unknown)>;
|
|
131
134
|
};
|
|
135
|
+
private createTransaction;
|
|
136
|
+
private buildTransaction;
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
export { EVMWallet };
|
package/dist/wallets/evm.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Wallet } from './wallet.js';
|
|
|
10
10
|
import '@solana/web3.js';
|
|
11
11
|
import '@crossmint/client-sdk-window';
|
|
12
12
|
import '@crossmint/client-signers';
|
|
13
|
+
import 'abitype';
|
|
13
14
|
import '../api/types.js';
|
|
14
15
|
import '../api/gen/types.gen.js';
|
|
15
16
|
import '../signers/types.js';
|
|
@@ -20,9 +21,11 @@ import '../api/client.js';
|
|
|
20
21
|
declare class EVMWallet extends Wallet<EVMChain> {
|
|
21
22
|
constructor(wallet: Wallet<EVMChain>);
|
|
22
23
|
static from(wallet: Wallet<Chain>): EVMWallet;
|
|
23
|
-
sendTransaction(params:
|
|
24
|
+
sendTransaction<T extends EVMTransactionInput>(params: T): Promise<Transaction<T["options"] extends {
|
|
25
|
+
experimental_prepareOnly: true;
|
|
26
|
+
} ? true : false>>;
|
|
24
27
|
signMessage(message: string): Promise<string>;
|
|
25
|
-
|
|
28
|
+
signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(params: TypedDataDefinition<typedData, primaryType> & {
|
|
26
29
|
chain: EVMSmartWalletChain;
|
|
27
30
|
}): Promise<string>;
|
|
28
31
|
getViemClient(params?: {
|
|
@@ -129,6 +132,8 @@ declare class EVMWallet extends Wallet<EVMChain> {
|
|
|
129
132
|
uid?: undefined;
|
|
130
133
|
} ? viem.PublicActions<HttpTransport, viem.Chain> : unknown)>;
|
|
131
134
|
};
|
|
135
|
+
private createTransaction;
|
|
136
|
+
private buildTransaction;
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
export { EVMWallet };
|
package/dist/wallets/evm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-MHBF3VBC.js";import"../chunk-5XUQSU22.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-BJDS5BJG.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-BW7YYVZE.js";export{a as EVMWallet};
|
package/dist/wallets/solana.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk63KMVANBcjs = require('../chunk-63KMVANB.cjs');require('../chunk-GEEQGXHO.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-XALFCQKD.cjs');exports.SolanaWallet = _chunk63KMVANBcjs.a;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SolanaChain, Chain } from '../chains/chains.cjs';
|
|
2
|
-
import { SolanaTransactionInput, Transaction } from './types.cjs';
|
|
2
|
+
import { TransactionInputOptions, SolanaTransactionInput, Transaction } from './types.cjs';
|
|
3
3
|
import { Wallet } from './wallet.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '@solana/web3.js';
|
|
6
6
|
import '@crossmint/client-sdk-window';
|
|
7
7
|
import '@crossmint/client-signers';
|
|
8
|
+
import 'abitype';
|
|
8
9
|
import '../api/types.cjs';
|
|
9
10
|
import '../api/gen/types.gen.cjs';
|
|
10
11
|
import '../signers/types.cjs';
|
|
@@ -15,7 +16,12 @@ import '../api/client.cjs';
|
|
|
15
16
|
declare class SolanaWallet extends Wallet<SolanaChain> {
|
|
16
17
|
constructor(wallet: Wallet<SolanaChain>);
|
|
17
18
|
static from(wallet: Wallet<Chain>): SolanaWallet;
|
|
18
|
-
sendTransaction
|
|
19
|
+
sendTransaction<T extends TransactionInputOptions | undefined = undefined>(params: SolanaTransactionInput & {
|
|
20
|
+
options?: T;
|
|
21
|
+
}): Promise<Transaction<T extends {
|
|
22
|
+
experimental_prepareOnly: true;
|
|
23
|
+
} ? true : false>>;
|
|
24
|
+
private createTransaction;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
export { SolanaWallet };
|
package/dist/wallets/solana.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SolanaChain, Chain } from '../chains/chains.js';
|
|
2
|
-
import { SolanaTransactionInput, Transaction } from './types.js';
|
|
2
|
+
import { TransactionInputOptions, SolanaTransactionInput, Transaction } from './types.js';
|
|
3
3
|
import { Wallet } from './wallet.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '@solana/web3.js';
|
|
6
6
|
import '@crossmint/client-sdk-window';
|
|
7
7
|
import '@crossmint/client-signers';
|
|
8
|
+
import 'abitype';
|
|
8
9
|
import '../api/types.js';
|
|
9
10
|
import '../api/gen/types.gen.js';
|
|
10
11
|
import '../signers/types.js';
|
|
@@ -15,7 +16,12 @@ import '../api/client.js';
|
|
|
15
16
|
declare class SolanaWallet extends Wallet<SolanaChain> {
|
|
16
17
|
constructor(wallet: Wallet<SolanaChain>);
|
|
17
18
|
static from(wallet: Wallet<Chain>): SolanaWallet;
|
|
18
|
-
sendTransaction
|
|
19
|
+
sendTransaction<T extends TransactionInputOptions | undefined = undefined>(params: SolanaTransactionInput & {
|
|
20
|
+
options?: T;
|
|
21
|
+
}): Promise<Transaction<T extends {
|
|
22
|
+
experimental_prepareOnly: true;
|
|
23
|
+
} ? true : false>>;
|
|
24
|
+
private createTransaction;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
export { SolanaWallet };
|
package/dist/wallets/solana.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-2LOGLK6Y.js";import"../chunk-5XUQSU22.js";import"../chunk-T3ICQDFS.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-BW7YYVZE.js";export{a as SolanaWallet};
|
package/dist/wallets/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
package/dist/wallets/types.d.cts
CHANGED
|
@@ -1,22 +1,44 @@
|
|
|
1
1
|
import { VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
2
2
|
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
3
3
|
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
4
|
+
import { Abi } from 'abitype';
|
|
4
5
|
import { CreateTransactionSuccessResponse } from '../api/types.cjs';
|
|
5
6
|
export { Activity } from '../api/types.cjs';
|
|
6
|
-
import {
|
|
7
|
+
import { Chain } from '../chains/chains.cjs';
|
|
8
|
+
import { SignerConfigForChain } from '../signers/types.cjs';
|
|
7
9
|
import 'viem';
|
|
8
10
|
import '../api/gen/types.gen.cjs';
|
|
11
|
+
import 'ox';
|
|
12
|
+
import '@crossmint/common-sdk-base';
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
type TransactionInputOptions = {
|
|
15
|
+
experimental_prepareOnly?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type EVMTransactionInputBase = {
|
|
18
|
+
options?: TransactionInputOptions;
|
|
19
|
+
};
|
|
20
|
+
type EVMTransactionInput = EVMTransactionInputBase & ({
|
|
11
21
|
to: string;
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
functionName?: string;
|
|
23
|
+
args?: unknown[];
|
|
14
24
|
value?: bigint;
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
abi?: Abi;
|
|
26
|
+
data?: `0x${string}`;
|
|
27
|
+
} | {
|
|
28
|
+
transaction: string;
|
|
29
|
+
});
|
|
30
|
+
type SolanaTransactionInput = {
|
|
17
31
|
transaction: VersionedTransaction;
|
|
18
32
|
additionalSigners?: Keypair[];
|
|
19
|
-
|
|
33
|
+
options?: TransactionInputOptions;
|
|
34
|
+
};
|
|
35
|
+
type FormattedEVMTransaction = {
|
|
36
|
+
to: string;
|
|
37
|
+
value: string;
|
|
38
|
+
data: string;
|
|
39
|
+
} | {
|
|
40
|
+
transaction: string;
|
|
41
|
+
};
|
|
20
42
|
type DelegatedSigner = {
|
|
21
43
|
signer: string;
|
|
22
44
|
};
|
|
@@ -29,6 +51,12 @@ type WalletOptions = {
|
|
|
29
51
|
experimental_callbacks?: Callbacks;
|
|
30
52
|
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
31
53
|
};
|
|
54
|
+
type WalletArgsFor<C extends Chain> = {
|
|
55
|
+
chain: C;
|
|
56
|
+
signer: SignerConfigForChain<C>;
|
|
57
|
+
owner?: string;
|
|
58
|
+
options?: WalletOptions;
|
|
59
|
+
};
|
|
32
60
|
type TokenBalance = {
|
|
33
61
|
symbol: "sol" | "eth" | "usdc" | string;
|
|
34
62
|
name: string;
|
|
@@ -53,9 +81,14 @@ type UserLocator = {
|
|
|
53
81
|
} | {
|
|
54
82
|
userId: string;
|
|
55
83
|
};
|
|
56
|
-
type Transaction = {
|
|
84
|
+
type Transaction<TPrepareOnly extends boolean = false> = TPrepareOnly extends true ? {
|
|
85
|
+
hash?: string;
|
|
86
|
+
explorerLink?: string;
|
|
87
|
+
transactionId: string;
|
|
88
|
+
} : {
|
|
57
89
|
hash: string;
|
|
58
90
|
explorerLink: string;
|
|
91
|
+
transactionId: string;
|
|
59
92
|
};
|
|
60
93
|
|
|
61
|
-
export type { Balances, Callbacks, DelegatedSigner, EVMTransactionInput, PendingApproval, SolanaTransactionInput, TokenBalance, Transaction, UserLocator, WalletOptions };
|
|
94
|
+
export type { Balances, Callbacks, DelegatedSigner, EVMTransactionInput, FormattedEVMTransaction, PendingApproval, SolanaTransactionInput, TokenBalance, Transaction, TransactionInputOptions, UserLocator, WalletArgsFor, WalletOptions };
|