UNPKG

oken-waas

Version:
242 lines (241 loc) 10.1 kB
/// <reference types="node" /> import { SignerOptions } from './src/components/okenSigner'; export type Config = { endpoint: string; network: string; okenClientId: string; privateKey: string; signer?: any; alchemyKey?: string; signerOptions?: SignerOptions; }; declare const _default: { /** * @dev Connect to the Oken API * @param config * @returns oken instance */ connect: ({ endpoint, network, okenClientId, privateKey, signer, signerOptions, alchemyKey }: Config) => { wallets: { create: (referenceId: string, signerType?: "VAULT" | "SMART_ACCOUNT" | undefined, network?: string | undefined) => Promise<import("./src/wallets").CreateWalletResponse>; batchCreate: (referenceIds: string[], signerType?: "VAULT" | "SMART_ACCOUNT" | undefined, network?: string | undefined) => Promise<import("./src/wallets").CreateWalletResponse[]>; createVaultAccount: (referenceId: string) => Promise<import("./src/wallets").CreateWalletResponse>; createSmartAccount: (referenceId: string, network: string) => Promise<import("./src/wallets").CreateWalletResponse>; get: (referenceId?: string | undefined) => Promise<import("./src/wallets").WalletResponse>; signTypedMessage: (typedData: import("./src/wallets").TypedMessage, message: any, signerWallet: string, contractAddress: string) => Promise<import("./src/wallets").SignedTypedMessage>; signMessage: (message: any, signerWallet: string) => Promise<import("./src/wallets").SignedMessage>; }; contracts: { batchOperation: ({ address }: { address: string; }) => import("./oken-types").BatchOperation; challenges: ({ address }: { address: string; }) => import("./oken-types").Challenges; controlledToken: ({ address }: { address: string; }) => import("./oken-types").ControlledToken; custody: ({ address }: { address: string; }) => import("./oken-types").Custody; eRC20Payout: ({ address }: { address: string; }) => import("./oken-types").ERC20Payout; exchangeProxy: ({ address }: { address: string; }) => import("./oken-types").ExchangeProxy; kYC: ({ address }: { address: string; }) => import("./oken-types").KYC; konaNetspaces: ({ address }: { address: string; }) => import("./oken-types").KonaNetspaces; lootBoxBatchMint: ({ address }: { address: string; }) => import("./oken-types").LootBoxBatchMint; lootBoxNFT: ({ address }: { address: string; }) => import("./oken-types").LootBoxNFT; lootbox: ({ address }: { address: string; }) => import("./oken-types").Lootbox; okenNFT: ({ address }: { address: string; }) => import("./oken-types").OkenNFT; proxyDeployer: ({ address }: { address: string; }) => import("./oken-types").ProxyDeployer; rarumCollectibles: ({ address }: { address: string; }) => import("./oken-types").RarumCollectibles; rarumDigitalTwin: ({ address }: { address: string; }) => import("./oken-types").RarumDigitalTwin; rarumEscrow: ({ address }: { address: string; }) => import("./oken-types").RarumEscrow; rarumLoyalty: ({ address }: { address: string; }) => import("./oken-types").RarumLoyalty; rarumNFT: ({ address }: { address: string; }) => import("./oken-types").RarumNFT; rarumNFTAuction: ({ address }: { address: string; }) => import("./oken-types").RarumNFTAuction; rarumSales: ({ address }: { address: string; }) => import("./oken-types").RarumSales; rarumToken: ({ address }: { address: string; }) => import("./oken-types").RarumToken; talentContracts: ({ address }: { address: string; }) => import("./oken-types").TalentContracts; tokenFactory: ({ address }: { address: string; }) => import("./oken-types").TokenFactory; tropixRouter: ({ address }: { address: string; }) => import("./oken-types").TropixRouter; tropixWalletETH: ({ address }: { address: string; }) => import("./oken-types").TropixWalletETH; }; transactions: { get: (id?: string | undefined, events?: string[] | undefined) => Promise<import("./src/transactions").Transaction | import("./src/transactions").Transaction[]>; }; errors: { ALREADY_CREATED: { new (message: any, info?: any): { info: any; name: string; message: string; stack?: string | undefined; cause?: unknown; }; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; }; SERVER_ERROR: { new (message: any, info?: any): { info: any; name: string; message: string; stack?: string | undefined; cause?: unknown; }; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; }; UNAUTHORIZED: { new (message: any, info?: any): { info: any; name: string; message: string; stack?: string | undefined; cause?: unknown; }; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; }; VALIDATION_ERROR: { new (message: any, info?: any): { info: any; name: string; message: string; stack?: string | undefined; cause?: unknown; }; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; }; INTEGRATION_ERROR: { new (message: any, info?: any): { info: any; name: string; message: string; stack?: string | undefined; cause?: unknown; }; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; }; fromAxios: (error: any) => never; }; }; /** * @dev List of available networks */ networks: import("./src/config/networks").Networks; /** * @dev List of available environments */ endpoints: { DOCKER: string; DEVELOPMENT: string; STAGING: string; PRODUCTION: string; }; /** * @dev Collection of some typed data structures. You can use your own typed data structures when signing v4 messages */ typedData: { ERC1155_PERMIT: { typeName: string; domainName: string; domainVersion: string; dataStructure: { name: string; type: string; }[]; }; ERC20_AUTHORIZE: { typeName: string; domainName: string; domainVersion: string; dataStructure: { type: string; name: string; }[]; }; OPERATOR_AUTHROZATION: { typeName: string; domainName: string; domainVersion: string; dataStructure: { type: string; name: string; }[]; }; TRANSFER_AUTHORIZATION: { typeName: string; domainName: string; domainVersion: string; dataStructure: { type: string; name: string; }[]; }; AUTHORIZE: { typeName: string; domainName: string; domainVersion: string; dataStructure: { type: string; name: string; }[]; }; }; }; export default _default;