UNPKG

@intuweb3/sdk

Version:

INTU SDK - Modern blockchain interaction toolkit

134 lines (133 loc) 6.88 kB
import Web3 from "web3"; import { VaultAllInfo } from "./web3/types/index.js"; import { PreRegistrationStep } from "./web3/models/vault.js"; export interface ProxyConfig { host: string; port: number; protocol?: "http" | "https"; auth?: { username: string; password: string; }; } export declare function parseProxyUrl(proxyUrl: string): ProxyConfig; export declare function createProxiedProvider(originalRpcUrl: string, proxyConfig: ProxyConfig): Promise<any>; export declare function createProxiedSigner(privateKey: string, proxyUrlOrConfig: string | ProxyConfig, rpcUrlToUse: string): Promise<{ web3: Web3; account: any; }>; export declare function createProxiedWebSocket(url: string, proxyConfig: ProxyConfig, protocols?: string | string[]): Promise<WebSocket>; export declare function subscribeToQueryWithProxy(queryName: string, params: any, proxyUrl: string, callbacks: { next: (data: any) => void; error: (error: any) => void; complete: () => void; }): { unsubscribe: () => void; }; export declare function makeProxiedRequest(url: string, proxyConfig: ProxyConfig, options?: { method?: string; headers?: Record<string, string>; body?: string; }): Promise<string>; export declare function makeProxiedGraphQLRequest(endpoint: string, query: string, proxyUrl: string): Promise<any>; export declare function makeProxiedRpcCall(url: string, method: string, params: any[], proxyUrl: string): Promise<any>; export declare function fetchSubgraphDataWithProxy(endpoint: string, query: string, proxyUrl: string): Promise<any>; export declare function getAllTransactionsWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string): Promise<any[]>; export declare function getVaultsWithProxy(userAddress: string, provider: any, proxyUrl: string, proxiedSigner?: { web3: Web3; account: any; }): Promise<VaultAllInfo[]>; export declare function _getUserPreRegisterInfosWeb3(vaultAddress: string, userAddress: string, chainId: number, proxyUrl: string): Promise<PreRegistrationStep>; export declare function getUserSignatureWeb3(vaultAddress: string, web3: Web3, account: any): Promise<string>; export declare function _getUserSignatureWeb3(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, chainId: number, proxyUrl: string): Promise<string>; export declare function preRegistrationWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, intuSignature?: string, returnHash?: boolean): Promise<any>; export declare function automateRegistrationWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, nostrNode?: string, intuSignature?: string, returnHashForFinalStep?: boolean): Promise<boolean>; export declare function registerAllStepsWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, intuSignature?: string, nostrNode?: string, returnHash?: boolean): Promise<any>; export declare function signTxWithProxy(vaultAddress: string, txId: number, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, intuSignature?: string, experimental?: boolean, returnHash?: boolean): Promise<any>; export declare function userConfirmTxWithProxy(vaultAddress: string, txId: number, confirmation: string, proxiedSigner: { web3: Web3; account: any; }, returnHash?: boolean): Promise<any>; export declare function _getRegistrationStep3InfosDBWeb3(vaultAddress: string, web3: Web3, chainId: number, proxyUrl: string): Promise<{ simpleKeyArray: string[]; simpleKappaArray: string[]; dealingKeyXLambdaArray: string[]; dealingKappaXLambdaArray: string[]; }>; export declare function _getUserRegistrationAllInfosWeb3(vaultAddress: string, web3: Web3, chainId: number, proxyUrl: string): Promise<any[]>; export declare function _getUserRegistrationSingleInfoWeb3(vaultAddress: string, userAddress: string, chainId: number, proxyUrl: string): Promise<any | null>; export declare function combineSignedTxWithProxy(vaultAddress: string, txId: number, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, experimental?: boolean): Promise<string>; export declare function _registerAllStepsWeb3(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, intuSignature?: string, nostrNode?: string, returnHash?: boolean): Promise<any>; export declare function testSimplePoolWithProxy(): Promise<any>; export declare function preRegistrationAllInfosWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string): Promise<{ parisEncKeyArray: string[]; megaPublicKeyArray: string[]; encMegaSecretKeyArray: string[]; dbPublicKeyArray: string[]; users: string[]; }>; export declare function userPreRegisterInfoWithProxy(vaultAddress: string, userAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string): Promise<PreRegistrationStep>; export declare function userRegistrationAllInfosWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string): Promise<any[]>; export declare function createVaultWithProxy(proposedAddresses: string[], vaultName: string, rotateThreshold: number, transactionThreshold: number, adminThreshold: number, proxiedSignerOrPrivateKey: { web3: Web3; account: any; } | string, proxyUrl: string, returnHash?: boolean): Promise<any>; export declare function createVaultWithProxyUrl(proposedAddresses: string[], vaultName: string, rotateThreshold: number, transactionThreshold: number, adminThreshold: number, privateKey: string, proxyUrl: string, returnHash?: boolean): Promise<any>; export declare function completeVaultWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, returnHash?: boolean): Promise<string | any>; export declare function submitTransactionWithProxy(vaultAddress: string, to: string, value: string, data: string, notes: string, proxiedSigner: { web3: Web3; account: any; }): Promise<any>; export declare function sendCombinedTransactionWithProxy(vaultAddress: string, txId: number, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string, experimental?: boolean): Promise<any>; export declare function combineSignedSolanaMessageWithProxy(vaultAddress: string, txId: number, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string): Promise<string>; export declare function registrationStep3InfosWithProxy(vaultAddress: string, proxiedSigner: { web3: Web3; account: any; }, proxyUrl: string): Promise<{ simpleKeyArray: string[]; simpleKappaArray: string[]; dealingKeyXLambdaArray: string[]; dealingKappaXLambdaArray: string[]; }>;