@settlemint/sdk-viem 2.1.5 → 2.2.0-maind07ccd95
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 +361 -36
- package/dist/viem.cjs +1 -1
- package/dist/viem.cjs.map +1 -1
- package/dist/viem.d.cts +312 -32
- package/dist/viem.d.ts +312 -32
- package/dist/viem.mjs +1 -1
- package/dist/viem.mjs.map +1 -1
- package/package.json +2 -2
package/dist/viem.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
|
-
import { HttpTransportConfig, Chain
|
|
2
|
+
import { HttpTransportConfig, Chain } from 'viem';
|
|
3
3
|
import * as chains from 'viem/chains';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -257,7 +257,7 @@ interface ClientOptions {
|
|
|
257
257
|
/**
|
|
258
258
|
* Get a public client. Use this if you need to read from the blockchain.
|
|
259
259
|
* @param options - The options for the public client.
|
|
260
|
-
* @returns The public client.
|
|
260
|
+
* @returns The public client. see {@link https://viem.sh/docs/clients/public}
|
|
261
261
|
* @example
|
|
262
262
|
* ```ts
|
|
263
263
|
* import { getPublicClient } from '@settlemint/sdk-viem';
|
|
@@ -7177,7 +7177,7 @@ interface WalletVerificationOptions {
|
|
|
7177
7177
|
/**
|
|
7178
7178
|
* Get a wallet client. Use this if you need to write to the blockchain.
|
|
7179
7179
|
* @param options - The options for the wallet client.
|
|
7180
|
-
* @returns A function that returns a wallet client. The function can be called with verification options.
|
|
7180
|
+
* @returns A function that returns a wallet client. The function can be called with verification options for HD wallets. see {@link https://viem.sh/docs/clients/wallet}
|
|
7181
7181
|
* @example
|
|
7182
7182
|
* ```ts
|
|
7183
7183
|
* import { getWalletClient } from '@settlemint/sdk-viem';
|
|
@@ -7205,7 +7205,7 @@ interface WalletVerificationOptions {
|
|
|
7205
7205
|
* console.log(transactionHash);
|
|
7206
7206
|
* ```
|
|
7207
7207
|
*/
|
|
7208
|
-
declare const getWalletClient:
|
|
7208
|
+
declare const getWalletClient: (options: ClientOptions) => (verificationOptions?: WalletVerificationOptions) => viem.Client<viem.HttpTransport<viem.RpcSchema | undefined, boolean>, Chain, undefined, viem.WalletRpcSchema, {
|
|
7209
7209
|
verifyWalletVerificationChallenge: (args: VerifyWalletVerificationChallengeParameters) => Promise<VerifyWalletVerificationChallengeResponse>;
|
|
7210
7210
|
} & {
|
|
7211
7211
|
createWalletVerificationChallenges: (args: CreateWalletVerificationChallengesParameters) => Promise<CreateWalletVerificationChallengesResponse>;
|
|
@@ -7218,26 +7218,179 @@ declare const getWalletClient: <C extends Chain>(options: ClientOptions) => (ver
|
|
|
7218
7218
|
} & {
|
|
7219
7219
|
createWallet: (args: CreateWalletParameters) => Promise<CreateWalletResponse[]>;
|
|
7220
7220
|
} & {
|
|
7221
|
-
call: (parameters: viem.CallParameters<
|
|
7222
|
-
createAccessList: (parameters: viem.CreateAccessListParameters<
|
|
7221
|
+
call: (parameters: viem.CallParameters<Chain>) => Promise<viem.CallReturnType>;
|
|
7222
|
+
createAccessList: (parameters: viem.CreateAccessListParameters<Chain>) => Promise<{
|
|
7223
7223
|
accessList: viem.AccessList;
|
|
7224
7224
|
gasUsed: bigint;
|
|
7225
7225
|
}>;
|
|
7226
7226
|
createBlockFilter: () => Promise<viem.CreateBlockFilterReturnType>;
|
|
7227
7227
|
createContractEventFilter: <const abi extends viem.Abi | readonly unknown[], eventName extends viem.ContractEventName<abi> | undefined, args extends viem.MaybeExtractEventArgsFromAbi<abi, eventName> | undefined, strict extends boolean | undefined = undefined, fromBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, toBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined>(args: viem.CreateContractEventFilterParameters<abi, eventName, args, strict, fromBlock, toBlock>) => Promise<viem.CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>;
|
|
7228
|
-
createEventFilter: <const abiEvent extends viem.AbiEvent | undefined = undefined, const abiEvents extends readonly viem.AbiEvent[] | readonly unknown[] | undefined = abiEvent extends viem.AbiEvent ? [abiEvent] : undefined,
|
|
7228
|
+
createEventFilter: <const abiEvent extends viem.AbiEvent | undefined = undefined, const abiEvents extends readonly viem.AbiEvent[] | readonly unknown[] | undefined = abiEvent extends viem.AbiEvent ? [abiEvent] : undefined, strict extends boolean | undefined = undefined, fromBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, toBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, _EventName extends string | undefined = viem.MaybeAbiEventName<abiEvent>, _Args extends viem.MaybeExtractEventArgsFromAbi<abiEvents, _EventName> | undefined = undefined>(args?: viem.CreateEventFilterParameters<abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args> | undefined) => Promise<viem.CreateEventFilterReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>>;
|
|
7229
7229
|
createPendingTransactionFilter: () => Promise<viem.CreatePendingTransactionFilterReturnType>;
|
|
7230
|
-
estimateContractGas: <chain extends Chain | undefined, const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">,
|
|
7231
|
-
estimateGas: (args: viem.EstimateGasParameters<
|
|
7230
|
+
estimateContractGas: <chain extends Chain | undefined, const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, args extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>>(args: viem.EstimateContractGasParameters<abi, functionName, args, chain>) => Promise<viem.EstimateContractGasReturnType>;
|
|
7231
|
+
estimateGas: (args: viem.EstimateGasParameters<Chain>) => Promise<viem.EstimateGasReturnType>;
|
|
7232
7232
|
getBalance: (args: viem.GetBalanceParameters) => Promise<viem.GetBalanceReturnType>;
|
|
7233
7233
|
getBlobBaseFee: () => Promise<viem.GetBlobBaseFeeReturnType>;
|
|
7234
|
-
getBlock: <includeTransactions extends boolean = false, blockTag extends viem.BlockTag = "latest">(args?: viem.GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<
|
|
7234
|
+
getBlock: <includeTransactions extends boolean = false, blockTag extends viem.BlockTag = "latest">(args?: viem.GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
|
|
7235
|
+
number: blockTag extends "pending" ? null : bigint;
|
|
7236
|
+
nonce: blockTag extends "pending" ? null : `0x${string}`;
|
|
7237
|
+
hash: blockTag extends "pending" ? null : `0x${string}`;
|
|
7238
|
+
baseFeePerGas: bigint | null;
|
|
7239
|
+
blobGasUsed: bigint;
|
|
7240
|
+
difficulty: bigint;
|
|
7241
|
+
excessBlobGas: bigint;
|
|
7242
|
+
extraData: viem.Hex;
|
|
7243
|
+
gasLimit: bigint;
|
|
7244
|
+
gasUsed: bigint;
|
|
7245
|
+
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
|
|
7246
|
+
miner: viem.Address;
|
|
7247
|
+
mixHash: viem.Hash;
|
|
7248
|
+
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
7249
|
+
parentHash: viem.Hash;
|
|
7250
|
+
receiptsRoot: viem.Hex;
|
|
7251
|
+
sealFields: viem.Hex[];
|
|
7252
|
+
sha3Uncles: viem.Hash;
|
|
7253
|
+
size: bigint;
|
|
7254
|
+
stateRoot: viem.Hash;
|
|
7255
|
+
timestamp: bigint;
|
|
7256
|
+
totalDifficulty: bigint | null;
|
|
7257
|
+
transactionsRoot: viem.Hash;
|
|
7258
|
+
uncles: viem.Hash[];
|
|
7259
|
+
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
7260
|
+
withdrawalsRoot?: `0x${string}` | undefined;
|
|
7261
|
+
transactions: includeTransactions extends true ? ({
|
|
7262
|
+
chainId?: number | undefined;
|
|
7263
|
+
from: viem.Address;
|
|
7264
|
+
gas: bigint;
|
|
7265
|
+
nonce: number;
|
|
7266
|
+
to: viem.Address | null;
|
|
7267
|
+
type: "legacy";
|
|
7268
|
+
value: bigint;
|
|
7269
|
+
r: viem.Hex;
|
|
7270
|
+
s: viem.Hex;
|
|
7271
|
+
v: bigint;
|
|
7272
|
+
yParity?: undefined | undefined;
|
|
7273
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7274
|
+
gasPrice: bigint;
|
|
7275
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7276
|
+
maxFeePerGas?: undefined | undefined;
|
|
7277
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
7278
|
+
accessList?: undefined | undefined;
|
|
7279
|
+
authorizationList?: undefined | undefined;
|
|
7280
|
+
hash: viem.Hash;
|
|
7281
|
+
input: viem.Hex;
|
|
7282
|
+
typeHex: viem.Hex | null;
|
|
7283
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
7284
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
7285
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
7286
|
+
} | {
|
|
7287
|
+
chainId: number;
|
|
7288
|
+
from: viem.Address;
|
|
7289
|
+
gas: bigint;
|
|
7290
|
+
nonce: number;
|
|
7291
|
+
to: viem.Address | null;
|
|
7292
|
+
type: "eip2930";
|
|
7293
|
+
value: bigint;
|
|
7294
|
+
r: viem.Hex;
|
|
7295
|
+
s: viem.Hex;
|
|
7296
|
+
v: bigint;
|
|
7297
|
+
yParity: number;
|
|
7298
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7299
|
+
gasPrice: bigint;
|
|
7300
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7301
|
+
maxFeePerGas?: undefined | undefined;
|
|
7302
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
7303
|
+
accessList: viem.AccessList;
|
|
7304
|
+
authorizationList?: undefined | undefined;
|
|
7305
|
+
hash: viem.Hash;
|
|
7306
|
+
input: viem.Hex;
|
|
7307
|
+
typeHex: viem.Hex | null;
|
|
7308
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : `0x${string}` : never : never;
|
|
7309
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : bigint : never : never;
|
|
7310
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
7311
|
+
} | {
|
|
7312
|
+
chainId: number;
|
|
7313
|
+
from: viem.Address;
|
|
7314
|
+
gas: bigint;
|
|
7315
|
+
nonce: number;
|
|
7316
|
+
to: viem.Address | null;
|
|
7317
|
+
type: "eip1559";
|
|
7318
|
+
value: bigint;
|
|
7319
|
+
r: viem.Hex;
|
|
7320
|
+
s: viem.Hex;
|
|
7321
|
+
v: bigint;
|
|
7322
|
+
yParity: number;
|
|
7323
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7324
|
+
gasPrice?: undefined | undefined;
|
|
7325
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7326
|
+
maxFeePerGas: bigint;
|
|
7327
|
+
maxPriorityFeePerGas: bigint;
|
|
7328
|
+
accessList: viem.AccessList;
|
|
7329
|
+
authorizationList?: undefined | undefined;
|
|
7330
|
+
hash: viem.Hash;
|
|
7331
|
+
input: viem.Hex;
|
|
7332
|
+
typeHex: viem.Hex | null;
|
|
7333
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : `0x${string}` : never : never;
|
|
7334
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : bigint : never : never;
|
|
7335
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
7336
|
+
} | {
|
|
7337
|
+
chainId: number;
|
|
7338
|
+
from: viem.Address;
|
|
7339
|
+
gas: bigint;
|
|
7340
|
+
nonce: number;
|
|
7341
|
+
to: viem.Address | null;
|
|
7342
|
+
type: "eip4844";
|
|
7343
|
+
value: bigint;
|
|
7344
|
+
r: viem.Hex;
|
|
7345
|
+
s: viem.Hex;
|
|
7346
|
+
v: bigint;
|
|
7347
|
+
yParity: number;
|
|
7348
|
+
blobVersionedHashes: readonly viem.Hex[];
|
|
7349
|
+
gasPrice?: undefined | undefined;
|
|
7350
|
+
maxFeePerBlobGas: bigint;
|
|
7351
|
+
maxFeePerGas: bigint;
|
|
7352
|
+
maxPriorityFeePerGas: bigint;
|
|
7353
|
+
accessList: viem.AccessList;
|
|
7354
|
+
authorizationList?: undefined | undefined;
|
|
7355
|
+
hash: viem.Hash;
|
|
7356
|
+
input: viem.Hex;
|
|
7357
|
+
typeHex: viem.Hex | null;
|
|
7358
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : `0x${string}` : never : never;
|
|
7359
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : bigint : never : never;
|
|
7360
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
7361
|
+
} | {
|
|
7362
|
+
chainId: number;
|
|
7363
|
+
from: viem.Address;
|
|
7364
|
+
gas: bigint;
|
|
7365
|
+
nonce: number;
|
|
7366
|
+
to: viem.Address | null;
|
|
7367
|
+
type: "eip7702";
|
|
7368
|
+
value: bigint;
|
|
7369
|
+
r: viem.Hex;
|
|
7370
|
+
s: viem.Hex;
|
|
7371
|
+
v: bigint;
|
|
7372
|
+
yParity: number;
|
|
7373
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7374
|
+
gasPrice?: undefined | undefined;
|
|
7375
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7376
|
+
maxFeePerGas: bigint;
|
|
7377
|
+
maxPriorityFeePerGas: bigint;
|
|
7378
|
+
accessList: viem.AccessList;
|
|
7379
|
+
authorizationList: viem.SignedAuthorizationList;
|
|
7380
|
+
hash: viem.Hash;
|
|
7381
|
+
input: viem.Hex;
|
|
7382
|
+
typeHex: viem.Hex | null;
|
|
7383
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : `0x${string}` : never : never;
|
|
7384
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : bigint : never : never;
|
|
7385
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_14 ? T_14 extends (blockTag extends "pending" ? true : false) ? T_14 extends true ? null : number : never : never;
|
|
7386
|
+
})[] : `0x${string}`[];
|
|
7387
|
+
}>;
|
|
7235
7388
|
getBlockNumber: (args?: viem.GetBlockNumberParameters | undefined) => Promise<viem.GetBlockNumberReturnType>;
|
|
7236
7389
|
getBlockTransactionCount: (args?: viem.GetBlockTransactionCountParameters | undefined) => Promise<viem.GetBlockTransactionCountReturnType>;
|
|
7237
7390
|
getBytecode: (args: viem.GetBytecodeParameters) => Promise<viem.GetBytecodeReturnType>;
|
|
7238
7391
|
getChainId: () => Promise<viem.GetChainIdReturnType>;
|
|
7239
7392
|
getCode: (args: viem.GetBytecodeParameters) => Promise<viem.GetBytecodeReturnType>;
|
|
7240
|
-
getContractEvents: <const
|
|
7393
|
+
getContractEvents: <const abi extends viem.Abi | readonly unknown[], eventName extends viem.ContractEventName<abi> | undefined = undefined, strict extends boolean | undefined = undefined, fromBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, toBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined>(args: viem.GetContractEventsParameters<abi, eventName, strict, fromBlock, toBlock>) => Promise<viem.GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>;
|
|
7241
7394
|
getEip712Domain: (args: viem.GetEip712DomainParameters) => Promise<viem.GetEip712DomainReturnType>;
|
|
7242
7395
|
getEnsAddress: (args: viem.GetEnsAddressParameters) => Promise<viem.GetEnsAddressReturnType>;
|
|
7243
7396
|
getEnsAvatar: (args: viem.GetEnsAvatarParameters) => Promise<viem.GetEnsAvatarReturnType>;
|
|
@@ -7245,24 +7398,151 @@ declare const getWalletClient: <C extends Chain>(options: ClientOptions) => (ver
|
|
|
7245
7398
|
getEnsResolver: (args: viem.GetEnsResolverParameters) => Promise<viem.GetEnsResolverReturnType>;
|
|
7246
7399
|
getEnsText: (args: viem.GetEnsTextParameters) => Promise<viem.GetEnsTextReturnType>;
|
|
7247
7400
|
getFeeHistory: (args: viem.GetFeeHistoryParameters) => Promise<viem.GetFeeHistoryReturnType>;
|
|
7248
|
-
estimateFeesPerGas: <chainOverride extends Chain | undefined = undefined, type extends viem.FeeValuesType = "eip1559">(args?: viem.EstimateFeesPerGasParameters<
|
|
7249
|
-
getFilterChanges: <filterType extends viem.FilterType, const
|
|
7250
|
-
getFilterLogs: <const
|
|
7401
|
+
estimateFeesPerGas: <chainOverride extends Chain | undefined = undefined, type extends viem.FeeValuesType = "eip1559">(args?: viem.EstimateFeesPerGasParameters<Chain, chainOverride, type> | undefined) => Promise<viem.EstimateFeesPerGasReturnType<type>>;
|
|
7402
|
+
getFilterChanges: <filterType extends viem.FilterType, const abi extends viem.Abi | readonly unknown[] | undefined, eventName extends string | undefined, strict extends boolean | undefined = undefined, fromBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, toBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined>(args: viem.GetFilterChangesParameters<filterType, abi, eventName, strict, fromBlock, toBlock>) => Promise<viem.GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>;
|
|
7403
|
+
getFilterLogs: <const abi extends viem.Abi | readonly unknown[] | undefined, eventName extends string | undefined, strict extends boolean | undefined = undefined, fromBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, toBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined>(args: viem.GetFilterLogsParameters<abi, eventName, strict, fromBlock, toBlock>) => Promise<viem.GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>;
|
|
7251
7404
|
getGasPrice: () => Promise<viem.GetGasPriceReturnType>;
|
|
7252
|
-
getLogs: <const abiEvent extends viem.AbiEvent | undefined = undefined, const
|
|
7405
|
+
getLogs: <const abiEvent extends viem.AbiEvent | undefined = undefined, const abiEvents extends readonly viem.AbiEvent[] | readonly unknown[] | undefined = abiEvent extends viem.AbiEvent ? [abiEvent] : undefined, strict extends boolean | undefined = undefined, fromBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined, toBlock extends viem.BlockNumber | viem.BlockTag | undefined = undefined>(args?: viem.GetLogsParameters<abiEvent, abiEvents, strict, fromBlock, toBlock> | undefined) => Promise<viem.GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>;
|
|
7253
7406
|
getProof: (args: viem.GetProofParameters) => Promise<viem.GetProofReturnType>;
|
|
7254
|
-
estimateMaxPriorityFeePerGas: <chainOverride extends Chain | undefined = undefined>(args?:
|
|
7407
|
+
estimateMaxPriorityFeePerGas: <chainOverride extends Chain | undefined = undefined>(args?: {
|
|
7408
|
+
chain?: chainOverride | null | undefined;
|
|
7409
|
+
} | undefined) => Promise<viem.EstimateMaxPriorityFeePerGasReturnType>;
|
|
7255
7410
|
getStorageAt: (args: viem.GetStorageAtParameters) => Promise<viem.GetStorageAtReturnType>;
|
|
7256
|
-
getTransaction: <
|
|
7257
|
-
|
|
7411
|
+
getTransaction: <blockTag extends viem.BlockTag = "latest">(args: viem.GetTransactionParameters<blockTag>) => Promise<{
|
|
7412
|
+
chainId?: number | undefined;
|
|
7413
|
+
from: viem.Address;
|
|
7414
|
+
gas: bigint;
|
|
7415
|
+
nonce: number;
|
|
7416
|
+
to: viem.Address | null;
|
|
7417
|
+
type: "legacy";
|
|
7418
|
+
value: bigint;
|
|
7419
|
+
r: viem.Hex;
|
|
7420
|
+
s: viem.Hex;
|
|
7421
|
+
v: bigint;
|
|
7422
|
+
yParity?: undefined | undefined;
|
|
7423
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7424
|
+
gasPrice: bigint;
|
|
7425
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7426
|
+
maxFeePerGas?: undefined | undefined;
|
|
7427
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
7428
|
+
accessList?: undefined | undefined;
|
|
7429
|
+
authorizationList?: undefined | undefined;
|
|
7430
|
+
hash: viem.Hash;
|
|
7431
|
+
input: viem.Hex;
|
|
7432
|
+
typeHex: viem.Hex | null;
|
|
7433
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
7434
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
7435
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
7436
|
+
} | {
|
|
7437
|
+
chainId: number;
|
|
7438
|
+
from: viem.Address;
|
|
7439
|
+
gas: bigint;
|
|
7440
|
+
nonce: number;
|
|
7441
|
+
to: viem.Address | null;
|
|
7442
|
+
type: "eip2930";
|
|
7443
|
+
value: bigint;
|
|
7444
|
+
r: viem.Hex;
|
|
7445
|
+
s: viem.Hex;
|
|
7446
|
+
v: bigint;
|
|
7447
|
+
yParity: number;
|
|
7448
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7449
|
+
gasPrice: bigint;
|
|
7450
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7451
|
+
maxFeePerGas?: undefined | undefined;
|
|
7452
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
7453
|
+
accessList: viem.AccessList;
|
|
7454
|
+
authorizationList?: undefined | undefined;
|
|
7455
|
+
hash: viem.Hash;
|
|
7456
|
+
input: viem.Hex;
|
|
7457
|
+
typeHex: viem.Hex | null;
|
|
7458
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : `0x${string}` : never : never;
|
|
7459
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : bigint : never : never;
|
|
7460
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
7461
|
+
} | {
|
|
7462
|
+
chainId: number;
|
|
7463
|
+
from: viem.Address;
|
|
7464
|
+
gas: bigint;
|
|
7465
|
+
nonce: number;
|
|
7466
|
+
to: viem.Address | null;
|
|
7467
|
+
type: "eip1559";
|
|
7468
|
+
value: bigint;
|
|
7469
|
+
r: viem.Hex;
|
|
7470
|
+
s: viem.Hex;
|
|
7471
|
+
v: bigint;
|
|
7472
|
+
yParity: number;
|
|
7473
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7474
|
+
gasPrice?: undefined | undefined;
|
|
7475
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7476
|
+
maxFeePerGas: bigint;
|
|
7477
|
+
maxPriorityFeePerGas: bigint;
|
|
7478
|
+
accessList: viem.AccessList;
|
|
7479
|
+
authorizationList?: undefined | undefined;
|
|
7480
|
+
hash: viem.Hash;
|
|
7481
|
+
input: viem.Hex;
|
|
7482
|
+
typeHex: viem.Hex | null;
|
|
7483
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : `0x${string}` : never : never;
|
|
7484
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : bigint : never : never;
|
|
7485
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
7486
|
+
} | {
|
|
7487
|
+
chainId: number;
|
|
7488
|
+
from: viem.Address;
|
|
7489
|
+
gas: bigint;
|
|
7490
|
+
nonce: number;
|
|
7491
|
+
to: viem.Address | null;
|
|
7492
|
+
type: "eip4844";
|
|
7493
|
+
value: bigint;
|
|
7494
|
+
r: viem.Hex;
|
|
7495
|
+
s: viem.Hex;
|
|
7496
|
+
v: bigint;
|
|
7497
|
+
yParity: number;
|
|
7498
|
+
blobVersionedHashes: readonly viem.Hex[];
|
|
7499
|
+
gasPrice?: undefined | undefined;
|
|
7500
|
+
maxFeePerBlobGas: bigint;
|
|
7501
|
+
maxFeePerGas: bigint;
|
|
7502
|
+
maxPriorityFeePerGas: bigint;
|
|
7503
|
+
accessList: viem.AccessList;
|
|
7504
|
+
authorizationList?: undefined | undefined;
|
|
7505
|
+
hash: viem.Hash;
|
|
7506
|
+
input: viem.Hex;
|
|
7507
|
+
typeHex: viem.Hex | null;
|
|
7508
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : `0x${string}` : never : never;
|
|
7509
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : bigint : never : never;
|
|
7510
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
7511
|
+
} | {
|
|
7512
|
+
chainId: number;
|
|
7513
|
+
from: viem.Address;
|
|
7514
|
+
gas: bigint;
|
|
7515
|
+
nonce: number;
|
|
7516
|
+
to: viem.Address | null;
|
|
7517
|
+
type: "eip7702";
|
|
7518
|
+
value: bigint;
|
|
7519
|
+
r: viem.Hex;
|
|
7520
|
+
s: viem.Hex;
|
|
7521
|
+
v: bigint;
|
|
7522
|
+
yParity: number;
|
|
7523
|
+
blobVersionedHashes?: undefined | undefined;
|
|
7524
|
+
gasPrice?: undefined | undefined;
|
|
7525
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
7526
|
+
maxFeePerGas: bigint;
|
|
7527
|
+
maxPriorityFeePerGas: bigint;
|
|
7528
|
+
accessList: viem.AccessList;
|
|
7529
|
+
authorizationList: viem.SignedAuthorizationList;
|
|
7530
|
+
hash: viem.Hash;
|
|
7531
|
+
input: viem.Hex;
|
|
7532
|
+
typeHex: viem.Hex | null;
|
|
7533
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : `0x${string}` : never : never;
|
|
7534
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : bigint : never : never;
|
|
7535
|
+
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_14 ? T_14 extends (blockTag extends "pending" ? true : false) ? T_14 extends true ? null : number : never : never;
|
|
7536
|
+
}>;
|
|
7537
|
+
getTransactionConfirmations: (args: viem.GetTransactionConfirmationsParameters<Chain>) => Promise<viem.GetTransactionConfirmationsReturnType>;
|
|
7258
7538
|
getTransactionCount: (args: viem.GetTransactionCountParameters) => Promise<viem.GetTransactionCountReturnType>;
|
|
7259
|
-
getTransactionReceipt: (args: viem.GetTransactionReceiptParameters) => Promise<viem.
|
|
7539
|
+
getTransactionReceipt: (args: viem.GetTransactionReceiptParameters) => Promise<viem.TransactionReceipt>;
|
|
7260
7540
|
multicall: <const contracts extends readonly unknown[], allowFailure extends boolean = true>(args: viem.MulticallParameters<contracts, allowFailure>) => Promise<viem.MulticallReturnType<contracts, allowFailure>>;
|
|
7261
|
-
prepareTransactionRequest: <const request extends viem.PrepareTransactionRequestRequest<
|
|
7541
|
+
prepareTransactionRequest: <const request extends viem.PrepareTransactionRequestRequest<Chain, chainOverride>, chainOverride extends Chain | undefined = undefined, accountOverride extends viem.Account | viem.Address | undefined = undefined>(args: viem.PrepareTransactionRequestParameters<Chain, undefined, chainOverride, accountOverride, request>) => Promise<viem.UnionRequiredBy<Extract<viem.UnionOmit<viem.ExtractChainFormatterParameters<viem.DeriveChain<Chain, chainOverride>, "transactionRequest", viem.TransactionRequest>, "from"> & (viem.DeriveChain<Chain, chainOverride> extends infer T_14 ? T_14 extends viem.DeriveChain<Chain, chainOverride> ? T_14 extends Chain ? {
|
|
7262
7542
|
chain: T_14;
|
|
7263
7543
|
} : {
|
|
7264
7544
|
chain?: undefined;
|
|
7265
|
-
} : never : never) & (viem.DeriveAccount<
|
|
7545
|
+
} : never : never) & (viem.DeriveAccount<undefined, accountOverride> extends infer T_15 ? T_15 extends viem.DeriveAccount<undefined, accountOverride> ? T_15 extends viem.Account ? {
|
|
7266
7546
|
account: T_15;
|
|
7267
7547
|
from: viem.Address;
|
|
7268
7548
|
} : {
|
|
@@ -10510,11 +10790,11 @@ declare const getWalletClient: <C extends Chain>(options: ClientOptions) => (ver
|
|
|
10510
10790
|
authorizationList: viem.TransactionSerializableEIP7702["authorizationList"];
|
|
10511
10791
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? viem.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
10512
10792
|
chainId?: number | undefined;
|
|
10513
|
-
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "chainId" | "gas" | "nonce" | "type" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "chainId" | "gas" | "nonce" | "type" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (viem.UnionRequiredBy<Extract<viem.UnionOmit<viem.ExtractChainFormatterParameters<viem.DeriveChain<
|
|
10793
|
+
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "chainId" | "gas" | "nonce" | "type" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "chainId" | "gas" | "nonce" | "type" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (viem.UnionRequiredBy<Extract<viem.UnionOmit<viem.ExtractChainFormatterParameters<viem.DeriveChain<Chain, chainOverride>, "transactionRequest", viem.TransactionRequest>, "from"> & (viem.DeriveChain<Chain, chainOverride> extends infer T_1 ? T_1 extends viem.DeriveChain<Chain, chainOverride> ? T_1 extends Chain ? {
|
|
10514
10794
|
chain: T_1;
|
|
10515
10795
|
} : {
|
|
10516
10796
|
chain?: undefined;
|
|
10517
|
-
} : never : never) & (viem.DeriveAccount<
|
|
10797
|
+
} : never : never) & (viem.DeriveAccount<undefined, accountOverride> extends infer T_2 ? T_2 extends viem.DeriveAccount<undefined, accountOverride> ? T_2 extends viem.Account ? {
|
|
10518
10798
|
account: T_2;
|
|
10519
10799
|
from: viem.Address;
|
|
10520
10800
|
} : {
|
|
@@ -13763,12 +14043,12 @@ declare const getWalletClient: <C extends Chain>(options: ClientOptions) => (ver
|
|
|
13763
14043
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? viem.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
13764
14044
|
chainId?: number | undefined;
|
|
13765
14045
|
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "chainId" | "gas" | "nonce" | "type" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "chainId" | "gas" | "nonce" | "type" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
13766
|
-
readContract: <const
|
|
14046
|
+
readContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "pure" | "view">, const args extends viem.ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: viem.ReadContractParameters<abi, functionName, args>) => Promise<viem.ReadContractReturnType<abi, functionName, args>>;
|
|
13767
14047
|
sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
|
|
13768
14048
|
simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
13769
14049
|
simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
13770
14050
|
simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
|
|
13771
|
-
simulateContract: <const
|
|
14051
|
+
simulateContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends Chain | undefined, accountOverride extends viem.Account | viem.Address | undefined = undefined>(args: viem.SimulateContractParameters<abi, functionName, args_1, Chain, chainOverride, accountOverride>) => Promise<viem.SimulateContractReturnType<abi, functionName, args_1, Chain, undefined, chainOverride, accountOverride>>;
|
|
13772
14052
|
verifyMessage: (args: viem.VerifyMessageActionParameters) => Promise<viem.VerifyMessageActionReturnType>;
|
|
13773
14053
|
verifySiweMessage: (args: {
|
|
13774
14054
|
blockNumber?: bigint | undefined | undefined;
|
|
@@ -13783,12 +14063,12 @@ declare const getWalletClient: <C extends Chain>(options: ClientOptions) => (ver
|
|
|
13783
14063
|
}) => Promise<boolean>;
|
|
13784
14064
|
verifyTypedData: (args: viem.VerifyTypedDataActionParameters) => Promise<viem.VerifyTypedDataActionReturnType>;
|
|
13785
14065
|
uninstallFilter: (args: viem.UninstallFilterParameters) => Promise<viem.UninstallFilterReturnType>;
|
|
13786
|
-
waitForTransactionReceipt: (args: viem.WaitForTransactionReceiptParameters<
|
|
14066
|
+
waitForTransactionReceipt: (args: viem.WaitForTransactionReceiptParameters<Chain>) => Promise<viem.TransactionReceipt>;
|
|
13787
14067
|
watchBlockNumber: (args: viem.WatchBlockNumberParameters) => viem.WatchBlockNumberReturnType;
|
|
13788
|
-
watchBlocks: <includeTransactions extends boolean = false,
|
|
13789
|
-
watchContractEvent: <const
|
|
13790
|
-
watchEvent: <const abiEvent extends viem.AbiEvent | undefined = undefined, const
|
|
13791
|
-
watchPendingTransactions: (args: viem.WatchPendingTransactionsParameters<
|
|
13792
|
-
} & viem.WalletActions<
|
|
14068
|
+
watchBlocks: <includeTransactions extends boolean = false, blockTag extends viem.BlockTag = "latest">(args: viem.WatchBlocksParameters<viem.HttpTransport<viem.RpcSchema | undefined, boolean>, Chain, includeTransactions, blockTag>) => viem.WatchBlocksReturnType;
|
|
14069
|
+
watchContractEvent: <const abi extends viem.Abi | readonly unknown[], eventName extends viem.ContractEventName<abi>, strict extends boolean | undefined = undefined>(args: viem.WatchContractEventParameters<abi, eventName, strict, viem.HttpTransport<viem.RpcSchema | undefined, boolean>>) => viem.WatchContractEventReturnType;
|
|
14070
|
+
watchEvent: <const abiEvent extends viem.AbiEvent | undefined = undefined, const abiEvents extends readonly viem.AbiEvent[] | readonly unknown[] | undefined = abiEvent extends viem.AbiEvent ? [abiEvent] : undefined, strict extends boolean | undefined = undefined>(args: viem.WatchEventParameters<abiEvent, abiEvents, strict, viem.HttpTransport<viem.RpcSchema | undefined, boolean>>) => viem.WatchEventReturnType;
|
|
14071
|
+
watchPendingTransactions: (args: viem.WatchPendingTransactionsParameters<viem.HttpTransport<viem.RpcSchema | undefined, boolean>>) => viem.WatchPendingTransactionsReturnType;
|
|
14072
|
+
} & viem.WalletActions<Chain, undefined>>;
|
|
13793
14073
|
|
|
13794
|
-
export { type ClientOptions, OTPAlgorithm, type WalletVerificationOptions, WalletVerificationType, getPublicClient, getWalletClient };
|
|
14074
|
+
export { type AddressOrObject, type ClientOptions, type CreateWalletParameters, type CreateWalletResponse, type CreateWalletVerificationChallengesParameters, type CreateWalletVerificationChallengesResponse, type CreateWalletVerificationParameters, type CreateWalletVerificationResponse, type DeleteWalletVerificationParameters, type DeleteWalletVerificationResponse, type GetWalletVerificationsParameters, type GetWalletVerificationsResponse, OTPAlgorithm, type VerificationResult, type VerifyWalletVerificationChallengeParameters, type VerifyWalletVerificationChallengeResponse, type WalletInfo, type WalletOTPVerificationInfo, type WalletPincodeVerificationInfo, type WalletSecretCodesVerificationInfo, type WalletVerification, type WalletVerificationChallenge, type WalletVerificationInfo, type WalletVerificationOptions, WalletVerificationType, getPublicClient, getWalletClient };
|
package/dist/viem.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{http as V,createPublicClient as u,createWalletClient as g,defineChain as y,publicActions as
|
|
1
|
+
import{http as V,createPublicClient as u,createWalletClient as g,defineChain as y,publicActions as R}from"viem";import*as x from"viem/chains";function o(e){return{createWalletVerificationChallenges(t){return e.request({method:"user_createWalletVerificationChallenges",params:[t.addressOrObject]})}}}function s(e){return{createWalletVerification(t){return e.request({method:"user_createWalletVerification",params:[t.userWalletAddress,t.walletVerificationInfo]})}}}function c(e){return{createWallet(t){return e.request({method:"user_createWallet",params:[t.keyVaultId,t.walletInfo]})}}}function f(e){return{deleteWalletVerification(t){return e.request({method:"user_deleteWalletVerification",params:[t.userWalletAddress,t.verificationId]})}}}function p(e){return{getWalletVerifications(t){return e.request({method:"user_walletVerifications",params:[t.userWalletAddress]})}}}function W(e){return{verifyWalletVerificationChallenge(t){return e.request({method:"user_verifyWalletVerificationChallenge",params:[t.addressOrObject,t.challengeResponse]})}}}var m=(l=>(l.PINCODE="PINCODE",l.OTP="OTP",l.SECRET_CODES="SECRET_CODES",l))(m||{}),d=(i=>(i.SHA1="SHA1",i.SHA224="SHA224",i.SHA256="SHA256",i.SHA384="SHA384",i.SHA512="SHA512",i.SHA3_224="SHA3-224",i.SHA3_256="SHA3-256",i.SHA3_384="SHA3-384",i.SHA3_512="SHA3-512",i))(d||{});var z=e=>u({chain:h(e),transport:V(e.rpcUrl,{batch:!0,timeout:6e4,...e.httpTransportConfig,fetchOptions:{...e?.httpTransportConfig?.fetchOptions,headers:{...e?.httpTransportConfig?.fetchOptions?.headers,"x-auth-token":e.accessToken}}})}),F=e=>{let t=h(e);return n=>g({chain:t,transport:V(e.rpcUrl,{batch:!0,timeout:6e4,...e.httpTransportConfig,fetchOptions:{...e?.httpTransportConfig?.fetchOptions,headers:{...e?.httpTransportConfig?.fetchOptions?.headers,"x-auth-token":e.accessToken,"x-auth-challenge-response":n?.challengeResponse??"","x-auth-verification-id":n?.verificationId??""}}})}).extend(R).extend(c).extend(p).extend(s).extend(f).extend(o).extend(W)};function h({chainId:e,chainName:t,rpcUrl:n}){return Object.values(x).find(C=>C.id.toString()===e)??y({id:Number(e),name:t,rpcUrls:{default:{http:[n]}},nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}})}export{d as OTPAlgorithm,m as WalletVerificationType,z as getPublicClient,F as getWalletClient};
|
|
2
2
|
//# sourceMappingURL=viem.mjs.map
|
package/dist/viem.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/viem.ts","../src/custom-actions/create-wallet-verification-challenges.action.ts","../src/custom-actions/create-wallet-verification.action.ts","../src/custom-actions/create-wallet.action.ts","../src/custom-actions/delete-wallet-verification.action.ts","../src/custom-actions/get-wallet-verifications.action.ts","../src/custom-actions/verify-wallet-verification-challenge.action.ts","../src/custom-actions/types/wallet-verification.enum.ts"],"sourcesContent":["import {\n http,\n type HttpTransportConfig,\n type Chain as ViemChain,\n type Transport as ViemTransport,\n type WalletClient,\n createPublicClient,\n createWalletClient,\n defineChain,\n publicActions,\n} from \"viem\";\nimport * as chains from \"viem/chains\";\nimport { createWalletVerificationChallenges } from \"./custom-actions/create-wallet-verification-challenges.action.js\";\nimport { createWalletVerification } from \"./custom-actions/create-wallet-verification.action.js\";\nimport { createWallet } from \"./custom-actions/create-wallet.action.js\";\nimport { deleteWalletVerification } from \"./custom-actions/delete-wallet-verification.action.js\";\nimport { getWalletVerifications } from \"./custom-actions/get-wallet-verifications.action.js\";\nimport { verifyWalletVerificationChallenge } from \"./custom-actions/verify-wallet-verification-challenge.action.js\";\n\n/**\n * The options for the viem client.\n */\nexport interface ClientOptions {\n /**\n * The access token\n */\n accessToken: string;\n /**\n * The chain id\n */\n chainId: string;\n /**\n * The chain name\n */\n chainName: string;\n /**\n * The json rpc url\n */\n rpcUrl: string;\n /**\n * The http transport config\n */\n httpTransportConfig?: HttpTransportConfig;\n}\n\n/**\n * Get a public client. Use this if you need to read from the blockchain.\n * @param options - The options for the public client.\n * @returns The public client.\n * @example\n * ```ts\n * import { getPublicClient } from '@settlemint/sdk-viem';\n *\n * const publicClient = getPublicClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the block number\n * const block = await publicClient.getBlockNumber();\n * console.log(block);\n * ```\n */\nexport const getPublicClient = (options: ClientOptions) =>\n createPublicClient({\n chain: getChain(options),\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n },\n },\n }),\n });\n\n/**\n * The options for the wallet client.\n */\nexport interface WalletVerificationOptions {\n /**\n * The verification id (used for HD wallets), if not provided, the challenge response will be validated against all active verifications.\n */\n verificationId?: string;\n /**\n * The challenge response (used for HD wallets)\n */\n challengeResponse: string;\n}\n\n/**\n * Get a wallet client. Use this if you need to write to the blockchain.\n * @param options - The options for the wallet client.\n * @returns A function that returns a wallet client. The function can be called with verification options.\n * @example\n * ```ts\n * import { getWalletClient } from '@settlemint/sdk-viem';\n * import { parseAbi } from \"viem\";\n *\n * const walletClient = getWalletClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the chain id\n * const chainId = await walletClient().getChainId();\n * console.log(chainId);\n *\n * // write to the blockchain\n * const transactionHash = await walletClient().writeContract({\n * account: \"0x0000000000000000000000000000000000000000\",\n * address: \"0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2\",\n * abi: parseAbi([\"function mint(uint32 tokenId) nonpayable\"]),\n * functionName: \"mint\",\n * args: [69420],\n * });\n * console.log(transactionHash);\n * ```\n */\nexport const getWalletClient = <C extends ViemChain>(options: ClientOptions) => {\n const chain = getChain(options);\n return (verificationOptions?: WalletVerificationOptions) =>\n (\n createWalletClient({\n chain: chain as ViemChain,\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n \"x-auth-challenge-response\": verificationOptions?.challengeResponse ?? \"\",\n \"x-auth-verification-id\": verificationOptions?.verificationId ?? \"\",\n },\n },\n }),\n }) as WalletClient<ViemTransport, C>\n )\n .extend(publicActions)\n .extend(createWallet)\n .extend(getWalletVerifications)\n .extend(createWalletVerification)\n .extend(deleteWalletVerification)\n .extend(createWalletVerificationChallenges)\n .extend(verifyWalletVerificationChallenge);\n};\n\nfunction getChain({ chainId, chainName, rpcUrl }: Pick<ClientOptions, \"chainId\" | \"chainName\" | \"rpcUrl\">): ViemChain {\n const knownChain = Object.values(chains).find((chain) => chain.id.toString() === chainId);\n return (\n knownChain ??\n defineChain({\n id: Number(chainId),\n name: chainName,\n rpcUrls: {\n default: {\n http: [rpcUrl],\n },\n },\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\",\n },\n })\n );\n}\n\nexport { OTPAlgorithm, WalletVerificationType } from \"./custom-actions/types/wallet-verification.enum.js\";\n","import type { Client } from \"viem\";\nimport type { WalletVerificationType } from \"./types/wallet-verification.enum.js\";\nimport type { AddressOrObject } from \"./verify-wallet-verification-challenge.action.js\";\n\n/**\n * Parameters for creating wallet verification challenges.\n */\nexport interface CreateWalletVerificationChallengesParameters {\n /** The wallet address or object containing wallet address and optional verification ID. */\n addressOrObject: AddressOrObject;\n}\n\n/**\n * Represents a wallet verification challenge.\n */\nexport interface WalletVerificationChallenge {\n /** The unique identifier of the challenge. */\n id: string;\n /** The name of the challenge. */\n name: string;\n /** The type of verification required. */\n verificationType: WalletVerificationType;\n /** The challenge parameters specific to the verification type. */\n challenge: Record<string, string>;\n}\n\n/**\n * Response from creating wallet verification challenges.\n */\nexport type CreateWalletVerificationChallengesResponse = WalletVerificationChallenge[];\n\n/**\n * RPC schema for creating wallet verification challenges.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWalletVerificationChallenges\";\n Parameters: [addressOrObject: AddressOrObject];\n ReturnType: CreateWalletVerificationChallengesResponse;\n};\n\n/**\n * Creates a wallet verification challenges action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWalletVerificationChallenges method.\n */\nexport function createWalletVerificationChallenges(client: Client) {\n return {\n /**\n * Creates verification challenges for a wallet.\n * @param args - The parameters for creating the challenges.\n * @returns A promise that resolves to an array of wallet verification challenges.\n */\n createWalletVerificationChallenges(\n args: CreateWalletVerificationChallengesParameters,\n ): Promise<CreateWalletVerificationChallengesResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWalletVerificationChallenges\",\n params: [args.addressOrObject],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\nimport type { OTPAlgorithm, WalletVerificationType } from \"./types/wallet-verification.enum.js\";\n\n/**\n * Base interface for wallet verification information.\n */\ntype BaseWalletVerificationInfo = {\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n};\n\n/**\n * Information for PIN code verification.\n */\nexport interface WalletPincodeVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.PINCODE;\n /** The PIN code to use for verification. */\n pincode: string;\n}\n\n/**\n * Information for One-Time Password (OTP) verification.\n */\nexport interface WalletOTPVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.OTP;\n /** The hash algorithm to use for OTP generation. */\n algorithm?: OTPAlgorithm;\n /** The number of digits in the OTP code. */\n digits?: number;\n /** The time period in seconds for OTP validity. */\n period?: number;\n /** The issuer of the OTP. */\n issuer?: string;\n}\n\n/**\n * Information for secret recovery codes verification.\n */\nexport interface WalletSecretCodesVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.SECRET_CODES;\n}\n\n/**\n * Union type of all possible wallet verification information types.\n */\nexport type WalletVerificationInfo =\n | WalletPincodeVerificationInfo\n | WalletOTPVerificationInfo\n | WalletSecretCodesVerificationInfo;\n\n/**\n * Parameters for creating a wallet verification.\n */\nexport interface CreateWalletVerificationParameters {\n /** The wallet address for which to create the verification. */\n userWalletAddress: string;\n /** The verification information to create. */\n walletVerificationInfo: WalletVerificationInfo;\n}\n\n/**\n * Response from creating a wallet verification.\n */\nexport interface CreateWalletVerificationResponse {\n /** The unique identifier of the verification. */\n id: string;\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n /** Additional parameters specific to the verification type. */\n parameters: Record<string, string>;\n}\n\n/**\n * RPC schema for creating a wallet verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWalletVerification\";\n Parameters: [userWalletAddress: string, walletVerificationInfo: WalletVerificationInfo];\n ReturnType: CreateWalletVerificationResponse[];\n};\n\n/**\n * Creates a wallet verification action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWalletVerification method.\n */\nexport function createWalletVerification(client: Client) {\n return {\n /**\n * Creates a new wallet verification.\n * @param args - The parameters for creating the verification.\n * @returns A promise that resolves to an array of created wallet verification responses.\n */\n createWalletVerification(args: CreateWalletVerificationParameters): Promise<CreateWalletVerificationResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWalletVerification\",\n params: [args.userWalletAddress, args.walletVerificationInfo],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Information about the wallet to be created.\n */\nexport interface WalletInfo {\n /** The name of the wallet. */\n name: string;\n}\n\n/**\n * Parameters for creating a wallet.\n */\nexport interface CreateWalletParameters {\n /** The unique name of the key vault where the wallet will be created. */\n keyVaultId: string;\n /** Information about the wallet to be created. */\n walletInfo: WalletInfo;\n}\n\n/**\n * Response from creating a wallet.\n */\nexport interface CreateWalletResponse {\n /** The unique identifier of the wallet. */\n id: string;\n /** The name of the wallet. */\n name: string;\n /** The blockchain address of the wallet. */\n address: string;\n /** The HD derivation path used to create the wallet. */\n derivationPath: string;\n}\n\n/**\n * RPC schema for wallet creation.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWallet\";\n Parameters: [keyVaultId: string, walletInfo: WalletInfo];\n ReturnType: CreateWalletResponse[];\n};\n\n/**\n * Creates a wallet action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWallet method.\n */\nexport function createWallet(client: Client) {\n return {\n /**\n * Creates a new wallet in the specified key vault.\n * @param args - The parameters for creating a wallet.\n * @returns A promise that resolves to an array of created wallet responses.\n */\n createWallet(args: CreateWalletParameters): Promise<CreateWalletResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWallet\",\n params: [args.keyVaultId, args.walletInfo],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Parameters for deleting a wallet verification.\n */\nexport interface DeleteWalletVerificationParameters {\n /** The wallet address for which to delete the verification. */\n userWalletAddress: string;\n /** The unique identifier of the verification to delete. */\n verificationId: string;\n}\n\n/**\n * Response from deleting a wallet verification.\n */\nexport interface DeleteWalletVerificationResponse {\n /** Whether the deletion was successful. */\n success: boolean;\n}\n\n/**\n * RPC schema for deleting a wallet verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_deleteWalletVerification\";\n Parameters: [userWalletAddress: string, verificationId: string];\n ReturnType: DeleteWalletVerificationResponse[];\n};\n\n/**\n * Creates a wallet verification deletion action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a deleteWalletVerification method.\n */\nexport function deleteWalletVerification(client: Client) {\n return {\n /**\n * Deletes a wallet verification.\n * @param args - The parameters for deleting the verification.\n * @returns A promise that resolves to an array of deletion results.\n */\n deleteWalletVerification(args: DeleteWalletVerificationParameters): Promise<DeleteWalletVerificationResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_deleteWalletVerification\",\n params: [args.userWalletAddress, args.verificationId],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\nimport type { WalletVerificationType } from \"./types/wallet-verification.enum.js\";\n\n/**\n * Parameters for getting wallet verifications.\n */\nexport interface GetWalletVerificationsParameters {\n /** The wallet address for which to fetch verifications. */\n userWalletAddress: string;\n}\n\n/**\n * Represents a wallet verification.\n */\nexport interface WalletVerification {\n /** The unique identifier of the verification. */\n id: string;\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n}\n\n/**\n * Response from getting wallet verifications.\n */\nexport type GetWalletVerificationsResponse = WalletVerification[];\n\n/**\n * RPC schema for getting wallet verifications.\n */\ntype WalletRpcSchema = {\n Method: \"user_walletVerifications\";\n Parameters: [userWalletAddress: string];\n ReturnType: GetWalletVerificationsResponse;\n};\n\n/**\n * Creates a wallet verifications retrieval action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a getWalletVerifications method.\n */\nexport function getWalletVerifications(client: Client) {\n return {\n /**\n * Gets all verifications for a wallet.\n * @param args - The parameters for getting the verifications.\n * @returns A promise that resolves to an array of wallet verifications.\n */\n getWalletVerifications(args: GetWalletVerificationsParameters): Promise<GetWalletVerificationsResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_walletVerifications\",\n params: [args.userWalletAddress],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Represents either a wallet address string or an object containing wallet address and optional verification ID.\n */\nexport type AddressOrObject =\n | string\n | {\n userWalletAddress: string;\n verificationId?: string;\n };\n\n/**\n * Parameters for verifying a wallet verification challenge.\n */\nexport interface VerifyWalletVerificationChallengeParameters {\n /** The wallet address or object containing wallet address and optional verification ID. */\n addressOrObject: AddressOrObject;\n /** The response to the verification challenge. */\n challengeResponse: string;\n}\n\n/**\n * Result of a wallet verification challenge.\n */\nexport interface VerificationResult {\n /** Whether the verification was successful. */\n verified: boolean;\n}\n\n/**\n * Response from verifying a wallet verification challenge.\n */\nexport type VerifyWalletVerificationChallengeResponse = VerificationResult[];\n\n/**\n * RPC schema for wallet verification challenge verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_verifyWalletVerificationChallenge\";\n Parameters: [addressOrObject: AddressOrObject, challengeResponse: string];\n ReturnType: VerifyWalletVerificationChallengeResponse;\n};\n\n/**\n * Creates a wallet verification challenge verification action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a verifyWalletVerificationChallenge method.\n */\nexport function verifyWalletVerificationChallenge(client: Client) {\n return {\n /**\n * Verifies a wallet verification challenge.\n * @param args - The parameters for verifying the challenge.\n * @returns A promise that resolves to an array of verification results.\n */\n verifyWalletVerificationChallenge(\n args: VerifyWalletVerificationChallengeParameters,\n ): Promise<VerifyWalletVerificationChallengeResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_verifyWalletVerificationChallenge\",\n params: [args.addressOrObject, args.challengeResponse],\n });\n },\n };\n}\n","/**\n * Types of wallet verification methods supported by the system.\n * Used to identify different verification mechanisms when creating or managing wallet verifications.\n */\nexport enum WalletVerificationType {\n /** PIN code verification method */\n PINCODE = \"PINCODE\",\n /** One-Time Password verification method */\n OTP = \"OTP\",\n /** Secret recovery codes verification method */\n SECRET_CODES = \"SECRET_CODES\",\n}\n\n/**\n * Supported hash algorithms for One-Time Password (OTP) verification.\n * These algorithms determine the cryptographic function used to generate OTP codes.\n */\nexport enum OTPAlgorithm {\n /** SHA-1 hash algorithm */\n SHA1 = \"SHA1\",\n /** SHA-224 hash algorithm */\n SHA224 = \"SHA224\",\n /** SHA-256 hash algorithm */\n SHA256 = \"SHA256\",\n /** SHA-384 hash algorithm */\n SHA384 = \"SHA384\",\n /** SHA-512 hash algorithm */\n SHA512 = \"SHA512\",\n /** SHA3-224 hash algorithm */\n SHA3_224 = \"SHA3-224\",\n /** SHA3-256 hash algorithm */\n SHA3_256 = \"SHA3-256\",\n /** SHA3-384 hash algorithm */\n SHA3_384 = \"SHA3-384\",\n /** SHA3-512 hash algorithm */\n SHA3_512 = \"SHA3-512\",\n}\n"],"mappings":"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","names":["http","createPublicClient","createWalletClient","defineChain","publicActions","chains","createWalletVerificationChallenges","client","args","createWalletVerification","client","args","createWallet","client","args","deleteWalletVerification","client","args","getWalletVerifications","client","args","verifyWalletVerificationChallenge","client","args","WalletVerificationType","OTPAlgorithm","getPublicClient","options","createPublicClient","getChain","http","getWalletClient","chain","verificationOptions","createWalletClient","publicActions","createWallet","getWalletVerifications","createWalletVerification","deleteWalletVerification","createWalletVerificationChallenges","verifyWalletVerificationChallenge","chainId","chainName","rpcUrl","chains","defineChain"]}
|
|
1
|
+
{"version":3,"sources":["../src/viem.ts","../src/custom-actions/create-wallet-verification-challenges.action.ts","../src/custom-actions/create-wallet-verification.action.ts","../src/custom-actions/create-wallet.action.ts","../src/custom-actions/delete-wallet-verification.action.ts","../src/custom-actions/get-wallet-verifications.action.ts","../src/custom-actions/verify-wallet-verification-challenge.action.ts","../src/custom-actions/types/wallet-verification.enum.ts"],"sourcesContent":["import {\n http,\n type HttpTransportConfig,\n type Chain as ViemChain,\n createPublicClient,\n createWalletClient,\n defineChain,\n publicActions,\n} from \"viem\";\nimport * as chains from \"viem/chains\";\nimport { createWalletVerificationChallenges } from \"./custom-actions/create-wallet-verification-challenges.action.js\";\nimport { createWalletVerification } from \"./custom-actions/create-wallet-verification.action.js\";\nimport { createWallet } from \"./custom-actions/create-wallet.action.js\";\nimport { deleteWalletVerification } from \"./custom-actions/delete-wallet-verification.action.js\";\nimport { getWalletVerifications } from \"./custom-actions/get-wallet-verifications.action.js\";\nimport { verifyWalletVerificationChallenge } from \"./custom-actions/verify-wallet-verification-challenge.action.js\";\n\n/**\n * The options for the viem client.\n */\nexport interface ClientOptions {\n /**\n * The access token\n */\n accessToken: string;\n /**\n * The chain id\n */\n chainId: string;\n /**\n * The chain name\n */\n chainName: string;\n /**\n * The json rpc url\n */\n rpcUrl: string;\n /**\n * The http transport config\n */\n httpTransportConfig?: HttpTransportConfig;\n}\n\n/**\n * Get a public client. Use this if you need to read from the blockchain.\n * @param options - The options for the public client.\n * @returns The public client. see {@link https://viem.sh/docs/clients/public}\n * @example\n * ```ts\n * import { getPublicClient } from '@settlemint/sdk-viem';\n *\n * const publicClient = getPublicClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the block number\n * const block = await publicClient.getBlockNumber();\n * console.log(block);\n * ```\n */\nexport const getPublicClient = (options: ClientOptions) =>\n createPublicClient({\n chain: getChain(options),\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n },\n },\n }),\n });\n\n/**\n * The options for the wallet client.\n */\nexport interface WalletVerificationOptions {\n /**\n * The verification id (used for HD wallets), if not provided, the challenge response will be validated against all active verifications.\n */\n verificationId?: string;\n /**\n * The challenge response (used for HD wallets)\n */\n challengeResponse: string;\n}\n\n/**\n * Get a wallet client. Use this if you need to write to the blockchain.\n * @param options - The options for the wallet client.\n * @returns A function that returns a wallet client. The function can be called with verification options for HD wallets. see {@link https://viem.sh/docs/clients/wallet}\n * @example\n * ```ts\n * import { getWalletClient } from '@settlemint/sdk-viem';\n * import { parseAbi } from \"viem\";\n *\n * const walletClient = getWalletClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the chain id\n * const chainId = await walletClient().getChainId();\n * console.log(chainId);\n *\n * // write to the blockchain\n * const transactionHash = await walletClient().writeContract({\n * account: \"0x0000000000000000000000000000000000000000\",\n * address: \"0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2\",\n * abi: parseAbi([\"function mint(uint32 tokenId) nonpayable\"]),\n * functionName: \"mint\",\n * args: [69420],\n * });\n * console.log(transactionHash);\n * ```\n */\nexport const getWalletClient = (options: ClientOptions) => {\n const chain = getChain(options);\n return (verificationOptions?: WalletVerificationOptions) =>\n createWalletClient({\n chain: chain,\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n \"x-auth-challenge-response\": verificationOptions?.challengeResponse ?? \"\",\n \"x-auth-verification-id\": verificationOptions?.verificationId ?? \"\",\n },\n },\n }),\n })\n .extend(publicActions)\n .extend(createWallet)\n .extend(getWalletVerifications)\n .extend(createWalletVerification)\n .extend(deleteWalletVerification)\n .extend(createWalletVerificationChallenges)\n .extend(verifyWalletVerificationChallenge);\n};\n\nfunction getChain({ chainId, chainName, rpcUrl }: Pick<ClientOptions, \"chainId\" | \"chainName\" | \"rpcUrl\">): ViemChain {\n const knownChain = Object.values(chains).find((chain) => chain.id.toString() === chainId);\n return (\n knownChain ??\n defineChain({\n id: Number(chainId),\n name: chainName,\n rpcUrls: {\n default: {\n http: [rpcUrl],\n },\n },\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\",\n },\n })\n );\n}\n\nexport { OTPAlgorithm, WalletVerificationType } from \"./custom-actions/types/wallet-verification.enum.js\";\n\nexport type {\n CreateWalletVerificationChallengesResponse,\n CreateWalletVerificationChallengesParameters,\n WalletVerificationChallenge,\n} from \"./custom-actions/create-wallet-verification-challenges.action.js\";\nexport type {\n CreateWalletVerificationResponse,\n CreateWalletVerificationParameters,\n WalletVerificationInfo,\n WalletPincodeVerificationInfo,\n WalletOTPVerificationInfo,\n WalletSecretCodesVerificationInfo,\n} from \"./custom-actions/create-wallet-verification.action.js\";\nexport type {\n CreateWalletResponse,\n CreateWalletParameters,\n WalletInfo,\n} from \"./custom-actions/create-wallet.action.js\";\nexport type {\n DeleteWalletVerificationParameters,\n DeleteWalletVerificationResponse,\n} from \"./custom-actions/delete-wallet-verification.action.js\";\nexport type {\n GetWalletVerificationsParameters,\n GetWalletVerificationsResponse,\n WalletVerification,\n} from \"./custom-actions/get-wallet-verifications.action.js\";\nexport type {\n VerifyWalletVerificationChallengeParameters,\n AddressOrObject,\n VerifyWalletVerificationChallengeResponse,\n VerificationResult,\n} from \"./custom-actions/verify-wallet-verification-challenge.action.js\";\n","import type { Client } from \"viem\";\nimport type { WalletVerificationType } from \"./types/wallet-verification.enum.js\";\nimport type { AddressOrObject } from \"./verify-wallet-verification-challenge.action.js\";\n\n/**\n * Parameters for creating wallet verification challenges.\n */\nexport interface CreateWalletVerificationChallengesParameters {\n /** The wallet address or object containing wallet address and optional verification ID. */\n addressOrObject: AddressOrObject;\n}\n\n/**\n * Represents a wallet verification challenge.\n */\nexport interface WalletVerificationChallenge {\n /** The unique identifier of the challenge. */\n id: string;\n /** The name of the challenge. */\n name: string;\n /** The type of verification required. */\n verificationType: WalletVerificationType;\n /** The challenge parameters specific to the verification type. */\n challenge: Record<string, string>;\n}\n\n/**\n * Response from creating wallet verification challenges.\n */\nexport type CreateWalletVerificationChallengesResponse = WalletVerificationChallenge[];\n\n/**\n * RPC schema for creating wallet verification challenges.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWalletVerificationChallenges\";\n Parameters: [addressOrObject: AddressOrObject];\n ReturnType: CreateWalletVerificationChallengesResponse;\n};\n\n/**\n * Creates a wallet verification challenges action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWalletVerificationChallenges method.\n */\nexport function createWalletVerificationChallenges(client: Client) {\n return {\n /**\n * Creates verification challenges for a wallet.\n * @param args - The parameters for creating the challenges.\n * @returns A promise that resolves to an array of wallet verification challenges.\n */\n createWalletVerificationChallenges(\n args: CreateWalletVerificationChallengesParameters,\n ): Promise<CreateWalletVerificationChallengesResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWalletVerificationChallenges\",\n params: [args.addressOrObject],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\nimport type { OTPAlgorithm, WalletVerificationType } from \"./types/wallet-verification.enum.js\";\n\n/**\n * Base interface for wallet verification information.\n */\ntype BaseWalletVerificationInfo = {\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n};\n\n/**\n * Information for PIN code verification.\n */\nexport interface WalletPincodeVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.PINCODE;\n /** The PIN code to use for verification. */\n pincode: string;\n}\n\n/**\n * Information for One-Time Password (OTP) verification.\n */\nexport interface WalletOTPVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.OTP;\n /** The hash algorithm to use for OTP generation. */\n algorithm?: OTPAlgorithm;\n /** The number of digits in the OTP code. */\n digits?: number;\n /** The time period in seconds for OTP validity. */\n period?: number;\n /** The issuer of the OTP. */\n issuer?: string;\n}\n\n/**\n * Information for secret recovery codes verification.\n */\nexport interface WalletSecretCodesVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.SECRET_CODES;\n}\n\n/**\n * Union type of all possible wallet verification information types.\n */\nexport type WalletVerificationInfo =\n | WalletPincodeVerificationInfo\n | WalletOTPVerificationInfo\n | WalletSecretCodesVerificationInfo;\n\n/**\n * Parameters for creating a wallet verification.\n */\nexport interface CreateWalletVerificationParameters {\n /** The wallet address for which to create the verification. */\n userWalletAddress: string;\n /** The verification information to create. */\n walletVerificationInfo: WalletVerificationInfo;\n}\n\n/**\n * Response from creating a wallet verification.\n */\nexport interface CreateWalletVerificationResponse {\n /** The unique identifier of the verification. */\n id: string;\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n /** Additional parameters specific to the verification type. */\n parameters: Record<string, string>;\n}\n\n/**\n * RPC schema for creating a wallet verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWalletVerification\";\n Parameters: [userWalletAddress: string, walletVerificationInfo: WalletVerificationInfo];\n ReturnType: CreateWalletVerificationResponse[];\n};\n\n/**\n * Creates a wallet verification action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWalletVerification method.\n */\nexport function createWalletVerification(client: Client) {\n return {\n /**\n * Creates a new wallet verification.\n * @param args - The parameters for creating the verification.\n * @returns A promise that resolves to an array of created wallet verification responses.\n */\n createWalletVerification(args: CreateWalletVerificationParameters): Promise<CreateWalletVerificationResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWalletVerification\",\n params: [args.userWalletAddress, args.walletVerificationInfo],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Information about the wallet to be created.\n */\nexport interface WalletInfo {\n /** The name of the wallet. */\n name: string;\n}\n\n/**\n * Parameters for creating a wallet.\n */\nexport interface CreateWalletParameters {\n /** The unique name of the key vault where the wallet will be created. */\n keyVaultId: string;\n /** Information about the wallet to be created. */\n walletInfo: WalletInfo;\n}\n\n/**\n * Response from creating a wallet.\n */\nexport interface CreateWalletResponse {\n /** The unique identifier of the wallet. */\n id: string;\n /** The name of the wallet. */\n name: string;\n /** The blockchain address of the wallet. */\n address: string;\n /** The HD derivation path used to create the wallet. */\n derivationPath: string;\n}\n\n/**\n * RPC schema for wallet creation.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWallet\";\n Parameters: [keyVaultId: string, walletInfo: WalletInfo];\n ReturnType: CreateWalletResponse[];\n};\n\n/**\n * Creates a wallet action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWallet method.\n */\nexport function createWallet(client: Client) {\n return {\n /**\n * Creates a new wallet in the specified key vault.\n * @param args - The parameters for creating a wallet.\n * @returns A promise that resolves to an array of created wallet responses.\n */\n createWallet(args: CreateWalletParameters): Promise<CreateWalletResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWallet\",\n params: [args.keyVaultId, args.walletInfo],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Parameters for deleting a wallet verification.\n */\nexport interface DeleteWalletVerificationParameters {\n /** The wallet address for which to delete the verification. */\n userWalletAddress: string;\n /** The unique identifier of the verification to delete. */\n verificationId: string;\n}\n\n/**\n * Response from deleting a wallet verification.\n */\nexport interface DeleteWalletVerificationResponse {\n /** Whether the deletion was successful. */\n success: boolean;\n}\n\n/**\n * RPC schema for deleting a wallet verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_deleteWalletVerification\";\n Parameters: [userWalletAddress: string, verificationId: string];\n ReturnType: DeleteWalletVerificationResponse[];\n};\n\n/**\n * Creates a wallet verification deletion action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a deleteWalletVerification method.\n */\nexport function deleteWalletVerification(client: Client) {\n return {\n /**\n * Deletes a wallet verification.\n * @param args - The parameters for deleting the verification.\n * @returns A promise that resolves to an array of deletion results.\n */\n deleteWalletVerification(args: DeleteWalletVerificationParameters): Promise<DeleteWalletVerificationResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_deleteWalletVerification\",\n params: [args.userWalletAddress, args.verificationId],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\nimport type { WalletVerificationType } from \"./types/wallet-verification.enum.js\";\n\n/**\n * Parameters for getting wallet verifications.\n */\nexport interface GetWalletVerificationsParameters {\n /** The wallet address for which to fetch verifications. */\n userWalletAddress: string;\n}\n\n/**\n * Represents a wallet verification.\n */\nexport interface WalletVerification {\n /** The unique identifier of the verification. */\n id: string;\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n}\n\n/**\n * Response from getting wallet verifications.\n */\nexport type GetWalletVerificationsResponse = WalletVerification[];\n\n/**\n * RPC schema for getting wallet verifications.\n */\ntype WalletRpcSchema = {\n Method: \"user_walletVerifications\";\n Parameters: [userWalletAddress: string];\n ReturnType: GetWalletVerificationsResponse;\n};\n\n/**\n * Creates a wallet verifications retrieval action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a getWalletVerifications method.\n */\nexport function getWalletVerifications(client: Client) {\n return {\n /**\n * Gets all verifications for a wallet.\n * @param args - The parameters for getting the verifications.\n * @returns A promise that resolves to an array of wallet verifications.\n */\n getWalletVerifications(args: GetWalletVerificationsParameters): Promise<GetWalletVerificationsResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_walletVerifications\",\n params: [args.userWalletAddress],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Represents either a wallet address string or an object containing wallet address and optional verification ID.\n */\nexport type AddressOrObject =\n | string\n | {\n userWalletAddress: string;\n verificationId?: string;\n };\n\n/**\n * Parameters for verifying a wallet verification challenge.\n */\nexport interface VerifyWalletVerificationChallengeParameters {\n /** The wallet address or object containing wallet address and optional verification ID. */\n addressOrObject: AddressOrObject;\n /** The response to the verification challenge. */\n challengeResponse: string;\n}\n\n/**\n * Result of a wallet verification challenge.\n */\nexport interface VerificationResult {\n /** Whether the verification was successful. */\n verified: boolean;\n}\n\n/**\n * Response from verifying a wallet verification challenge.\n */\nexport type VerifyWalletVerificationChallengeResponse = VerificationResult[];\n\n/**\n * RPC schema for wallet verification challenge verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_verifyWalletVerificationChallenge\";\n Parameters: [addressOrObject: AddressOrObject, challengeResponse: string];\n ReturnType: VerifyWalletVerificationChallengeResponse;\n};\n\n/**\n * Creates a wallet verification challenge verification action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a verifyWalletVerificationChallenge method.\n */\nexport function verifyWalletVerificationChallenge(client: Client) {\n return {\n /**\n * Verifies a wallet verification challenge.\n * @param args - The parameters for verifying the challenge.\n * @returns A promise that resolves to an array of verification results.\n */\n verifyWalletVerificationChallenge(\n args: VerifyWalletVerificationChallengeParameters,\n ): Promise<VerifyWalletVerificationChallengeResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_verifyWalletVerificationChallenge\",\n params: [args.addressOrObject, args.challengeResponse],\n });\n },\n };\n}\n","/**\n * Types of wallet verification methods supported by the system.\n * Used to identify different verification mechanisms when creating or managing wallet verifications.\n */\nexport enum WalletVerificationType {\n /** PIN code verification method */\n PINCODE = \"PINCODE\",\n /** One-Time Password verification method */\n OTP = \"OTP\",\n /** Secret recovery codes verification method */\n SECRET_CODES = \"SECRET_CODES\",\n}\n\n/**\n * Supported hash algorithms for One-Time Password (OTP) verification.\n * These algorithms determine the cryptographic function used to generate OTP codes.\n */\nexport enum OTPAlgorithm {\n /** SHA-1 hash algorithm */\n SHA1 = \"SHA1\",\n /** SHA-224 hash algorithm */\n SHA224 = \"SHA224\",\n /** SHA-256 hash algorithm */\n SHA256 = \"SHA256\",\n /** SHA-384 hash algorithm */\n SHA384 = \"SHA384\",\n /** SHA-512 hash algorithm */\n SHA512 = \"SHA512\",\n /** SHA3-224 hash algorithm */\n SHA3_224 = \"SHA3-224\",\n /** SHA3-256 hash algorithm */\n SHA3_256 = \"SHA3-256\",\n /** SHA3-384 hash algorithm */\n SHA3_384 = \"SHA3-384\",\n /** SHA3-512 hash algorithm */\n SHA3_512 = \"SHA3-512\",\n}\n"],"mappings":"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","names":["http","createPublicClient","createWalletClient","defineChain","publicActions","chains","createWalletVerificationChallenges","client","args","createWalletVerification","client","args","createWallet","client","args","deleteWalletVerification","client","args","getWalletVerifications","client","args","verifyWalletVerificationChallenge","client","args","WalletVerificationType","OTPAlgorithm","getPublicClient","options","createPublicClient","getChain","http","getWalletClient","chain","verificationOptions","createWalletClient","publicActions","createWallet","getWalletVerifications","createWalletVerification","deleteWalletVerification","createWalletVerificationChallenges","verifyWalletVerificationChallenge","chainId","chainName","rpcUrl","chains","defineChain"]}
|