@tokenbound/sdk
Advanced tools
Comparing version 0.5.1 to 0.5.2
import { PublicClient } from 'viem'; | ||
import { CallData } from '../types'; | ||
type CrossChainCallParams = { | ||
publicClient: PublicClient; | ||
account: `0x${string}`; | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
originChainId: number; | ||
destinationChainId: number; | ||
}; | ||
type CrossChainCallData = { | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}; | ||
export declare function encodeCrossChainCall(params: CrossChainCallParams): Promise<CrossChainCallData>; | ||
} & CallData; | ||
export declare function encodeCrossChainCall(params: CrossChainCallParams): Promise<CallData>; | ||
export {}; |
import { PublicClient, WalletClient } from 'viem'; | ||
import { erc6551AccountAbiV2, erc6551RegistryAbiV2 } from '../../abis'; | ||
import { erc6551AccountProxyV3ABI, erc6551AccountV3ABI, erc6551RegistryV3ABI } from '../../src/test/wagmi-cli-hooks/generated'; | ||
import { CallData } from '../types'; | ||
export { erc6551AccountAbiV2, erc6551RegistryAbiV2, erc6551AccountProxyV3ABI, erc6551AccountV3ABI, erc6551RegistryV3ABI, }; | ||
@@ -14,7 +15,3 @@ /** | ||
*/ | ||
export declare function prepareCreateAccount(tokenContract: string, tokenId: string, chainId: number, implementationAddress?: `0x${string}`, registryAddress?: `0x${string}`, salt?: number): Promise<{ | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
export declare function prepareCreateAccount(tokenContract: string, tokenId: string, chainId: number, implementationAddress?: `0x${string}`, registryAddress?: `0x${string}`, salt?: number): Promise<CallData>; | ||
/** | ||
@@ -29,7 +26,3 @@ * @deprecated Direct consumption of this function is deprecated. Consume via TokenboundClient instead. | ||
*/ | ||
export declare function prepareExecuteCall(account: string, to: string, value: bigint, data: string): Promise<{ | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
export declare function prepareExecuteCall(account: string, to: string, value: bigint, data: string): Promise<CallData>; | ||
/** | ||
@@ -36,0 +29,0 @@ * @deprecated Direct consumption of this function is deprecated. Consume via TokenboundClient instead. |
import { WalletClient } from 'viem'; | ||
import { erc6551AccountProxyV3ABI, erc6551AccountV3ABI, erc6551RegistryV3ABI } from '../../src/test/wagmi-cli-hooks/generated'; | ||
import { CallData } from '../types'; | ||
export { erc6551AccountProxyV3ABI, erc6551AccountV3ABI, erc6551RegistryV3ABI }; | ||
@@ -8,7 +9,3 @@ /** | ||
*/ | ||
export declare function prepareCreateTokenboundV3Account(tokenContract: string, tokenId: string, chainId: number, implementationAddress?: `0x${string}`, registryAddress?: `0x${string}`, salt?: number): Promise<{ | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
export declare function prepareCreateTokenboundV3Account(tokenContract: string, tokenId: string, chainId: number, implementationAddress?: `0x${string}`, registryAddress?: `0x${string}`, salt?: number): Promise<CallData>; | ||
/** | ||
@@ -23,7 +20,3 @@ * @deprecated Direct consumption of this function is deprecated. Consume via TokenboundClient instead. | ||
*/ | ||
export declare function prepareTokenboundV3Execute(account: string, to: string, value: bigint, data: string): Promise<{ | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
export declare function prepareTokenboundV3Execute(account: string, to: string, value: bigint, data: string): Promise<CallData>; | ||
/** | ||
@@ -30,0 +23,0 @@ * @deprecated Direct consumption of this function is deprecated. Consume via TokenboundClient instead. |
import { erc6551AccountAbiV2, erc6551RegistryAbiV2 } from '../abis'; | ||
import { getAccount, computeAccount, createAccount, getCreationCode, prepareExecuteCall, executeCall, prepareCreateAccount } from './functions'; | ||
import { TokenboundAccountNFT, TokenboundClientOptions, GetAccountParams, TBAccountParams, PrepareCreateAccountParams, CreateAccountParams, PrepareExecuteCallParams, ExecuteCallParams, SignMessageParams, ComputeAccountParams, GetCreationCodeParams, ERC20TransferParams, ETHTransferParams, NFTTransferParams, BytecodeParams, TBImplementationVersion, TBVersion, MultiCallTx, Call3, CALL_OPERATIONS, SegmentedERC6551Bytecode } from './types'; | ||
import { TokenboundAccountNFT, TokenboundClientOptions, GetAccountParams, TBAccountParams, PrepareCreateAccountParams, CreateAccountParams, PrepareExecuteCallParams, ExecuteCallParams, SignMessageParams, ComputeAccountParams, GetCreationCodeParams, ERC20TransferParams, ETHTransferParams, NFTTransferParams, BytecodeParams, TBImplementationVersion, TBVersion, MultiCallTx, Call3, CALL_OPERATIONS, SegmentedERC6551Bytecode, CallData } from './types'; | ||
import { TokenboundClient, erc6551AccountAbiV3, erc6551AccountProxyAbiV3, erc6551RegistryAbiV3 } from './TokenboundClient'; | ||
export { TokenboundClient, TBVersion, erc6551AccountAbiV2, erc6551RegistryAbiV2, erc6551AccountAbiV3, erc6551AccountProxyAbiV3, erc6551RegistryAbiV3, getAccount, computeAccount, prepareCreateAccount, createAccount, getCreationCode, prepareExecuteCall, executeCall, CALL_OPERATIONS, }; | ||
export type { TokenboundClientOptions, TokenboundAccountNFT, GetAccountParams, TBAccountParams, PrepareCreateAccountParams, CreateAccountParams, PrepareExecuteCallParams, ExecuteCallParams, ComputeAccountParams, GetCreationCodeParams, BytecodeParams, SignMessageParams, ERC20TransferParams, ETHTransferParams, NFTTransferParams, TBImplementationVersion, MultiCallTx, Call3, SegmentedERC6551Bytecode }; | ||
export type { TokenboundClientOptions, TokenboundAccountNFT, GetAccountParams, TBAccountParams, PrepareCreateAccountParams, CreateAccountParams, PrepareExecuteCallParams, ExecuteCallParams, ComputeAccountParams, GetCreationCodeParams, BytecodeParams, SignMessageParams, ERC20TransferParams, ETHTransferParams, NFTTransferParams, TBImplementationVersion, MultiCallTx, Call3, CallData, SegmentedERC6551Bytecode }; |
import { PublicClient } from 'viem'; | ||
import { getAccount, computeAccount, createAccount, getCreationCode, prepareExecuteCall, executeCall } from './functions'; | ||
import { BytecodeParams, CreateAccountParams, ERC20TransferParams, SignMessageParams, ETHTransferParams, ExecuteCallParams, GetAccountParams, NFTTransferParams, PrepareCreateAccountParams, PrepareExecuteCallParams, SegmentedERC6551Bytecode, TokenboundAccountNFT, TokenboundClientOptions, ExecuteParams, PrepareExecutionParams, ValidSignerParams, MultiCallTx } from './types'; | ||
import { BytecodeParams, CreateAccountParams, ERC20TransferParams, SignMessageParams, ETHTransferParams, ExecuteCallParams, GetAccountParams, NFTTransferParams, PrepareCreateAccountParams, PrepareExecuteCallParams, SegmentedERC6551Bytecode, TokenboundAccountNFT, TokenboundClientOptions, ExecuteParams, PrepareExecutionParams, ValidSignerParams, MultiCallTx, CallData } from './types'; | ||
declare global { | ||
@@ -38,7 +38,3 @@ interface Window { | ||
*/ | ||
prepareCreateAccount(params: PrepareCreateAccountParams): Promise<MultiCallTx | { | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
prepareCreateAccount(params: PrepareCreateAccountParams): Promise<MultiCallTx | CallData>; | ||
/** | ||
@@ -63,7 +59,3 @@ * Returns the transaction hash of the transaction that created the tokenbound account for a given token contract and token ID. | ||
*/ | ||
prepareExecuteCall(params: PrepareExecuteCallParams): Promise<{ | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
prepareExecuteCall(params: PrepareExecuteCallParams): Promise<CallData>; | ||
/** | ||
@@ -87,7 +79,3 @@ * Executes a transaction call on a tokenbound account | ||
*/ | ||
prepareExecution(params: PrepareExecutionParams): Promise<{ | ||
to: `0x${string}`; | ||
value: bigint; | ||
data: `0x${string}`; | ||
}>; | ||
prepareExecution(params: PrepareExecutionParams): Promise<CallData>; | ||
/** | ||
@@ -94,0 +82,0 @@ * Executes a transaction call on a tokenbound account |
@@ -1,2 +0,1 @@ | ||
export * from './abstractBigNumber'; | ||
export * from './abstractEthersSigner'; | ||
@@ -6,2 +5,3 @@ export * from './abstractEthersTransactionResponse'; | ||
export * from './anvilAccount'; | ||
export * from './callData'; | ||
export * from './contractABIPair'; | ||
@@ -8,0 +8,0 @@ export * from './operations'; |
export * from './addressToUint8Array'; | ||
export * from './chainIdToChain'; | ||
export * from './ethersAdaptors'; | ||
export * from './getImplementationName'; | ||
export * from './isAbstractBigNumber'; | ||
export * from './messageTypeguards'; | ||
@@ -7,0 +5,0 @@ export * from './normalizeEthersMessage'; |
{ | ||
"name": "@tokenbound/sdk", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"type": "module", | ||
@@ -33,3 +33,3 @@ "files": [ | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"@viem/anvil": "^0.0.6", | ||
"@viem/anvil": "^0.0.9", | ||
"@vitest/coverage-c8": "^0.33.0", | ||
@@ -54,3 +54,3 @@ "@wagmi/cli": "^1.5.2", | ||
"wagmi": "^1.4.7", | ||
"@tokenbound/sdk": "^0.5.1" | ||
"@tokenbound/sdk": "^0.5.2" | ||
}, | ||
@@ -63,5 +63,5 @@ "scripts": { | ||
"coverage": "vitest run --coverage", | ||
"clean": "rm -rf node_modules/", | ||
"clean": "rm -rf node_modules/ dist/", | ||
"wagmi": "wagmi generate" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3
7
2
793181
38
14669