Skip to main content

Portal Class

The Portal class is the main entry point for the Portal Web SDK. It provides methods for wallet management, transaction signing, and blockchain interactions.

Constructor

Creates a new Portal instance with the specified configuration.
constructor(options: PortalOptions)
Parameters
NameTypeRequiredDefaultDescription
options.rpcConfigRpcConfigYes-Configuration object mapping chain IDs to RPC URLs (e.g., { "eip155:1": "https://..." })
options.apiKeystringNo-Portal API key for authentication
options.authTokenstringNo-Authentication token for Portal services
options.authUrlstringNo-Custom authentication URL
options.autoApprovebooleanNofalseAutomatically approve transactions without user confirmation
options.gdriveGDriveConfigNo-Google Drive backup configuration with clientId
options.passkeyPasskeyConfigNo-Passkey configuration for WebAuthn backup
options.hoststringNo'web.portalhq.io'Portal host URL
options.mpcVersionstringNo'v6'MPC protocol version
options.mpcHoststringNo'mpc-client.portalhq.io'MPC service host
options.featureFlagsFeatureFlagsNo{}Feature flags configuration
options.chainIdstringNo-Default chain ID for the provider
Example Usage
import Portal from '@portal-hq/web';

const portal = new Portal({
  rpcConfig: {
    'eip155:1': 'https://...',
    'eip155:11155111': 'https://...',
    'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': 'https://...',
  },
  apiKey: 'your-api-key',
  chainId: 'eip155:1',
  gdrive: {
    clientId: 'your-client-id',
  },
});

Public Properties

PropertyTypeDescription
addressstring | undefinedThe current wallet address
apiKeystring | undefinedPortal API key
authTokenstring | undefinedAuthentication token
authUrlstring | undefinedAuthentication URL
autoApprovebooleanAuto-approve transactions setting
gDriveConfigGDriveConfig | undefinedGoogle Drive configuration
passkeyConfigPasskeyConfig | undefinedPasskey configuration
hoststringPortal host URL
mpcMpcMPC instance for wallet operations
yieldYieldYield.xyz integration instance
tradingTradingLiFi trading integration instance
mpcHoststringMPC service host
mpcVersionstringMPC protocol version
providerProviderProvider instance for RPC requests
featureFlagsFeatureFlagsFeature flags configuration
readybooleanWhether the Portal instance is ready (read-only getter)

Initialization Methods

onReady

Registers a callback to be executed when the Portal instance is ready.
public onReady(callback: () => any | Promise<any>): () => void
Parameters
NameTypeDescription
callback() => any | Promise<any>Function to execute when ready
Returns A cleanup function that removes the callback when called. Example Usage
const unsubscribe = portal.onReady(() => {
  console.log('Portal is ready!');
});

// Later, to remove the callback:
unsubscribe();

onInitializationError

Registers a callback to be executed if initialization fails.
public onInitializationError(callback: (reason: string) => any | Promise<any>): () => void
Parameters
NameTypeDescription
callback(reason: string) => any | Promise<any>Function to execute on error, receives error reason
Returns A cleanup function that removes the callback when called. Example Usage
const unsubscribe = portal.onInitializationError(reason => {
  console.error('Initialization failed:', reason);
});

Wallet Lifecycle Methods

createWallet

Creates a new wallet and generates addresses for supported chains.
public async createWallet(progress?: ProgressCallback): Promise<string>
Parameters
NameTypeDescription
progressProgressCallbackOptional callback for tracking progress with MpcStatus updates
Returns Promise<string> - The wallet address Example Usage
const address = await portal.createWallet(status => {
  console.log('Status:', status);
});

console.log('Wallet created with address:', address);

backupWallet

Creates a backup of the wallet using the specified backup method.
public async backupWallet(
  backupMethod: BackupMethods,
  progress?: ProgressCallback,
  backupConfigs?: BackupConfigs
): Promise<BackupResponse>
Parameters
NameTypeDescription
backupMethodBackupMethodsBackup method: GDRIVE, PASSWORD, or PASSKEY
progressProgressCallbackOptional progress callback
backupConfigsBackupConfigsOptional backup configuration (e.g., password)
Returns Promise<BackupResponse> containing:
  • cipherText: Encrypted backup data
  • storageCallback: Function to finalize storage
Example Usage
// Password backup
const backup = await portal.backupWallet(BackupMethods.password, status => console.log(status), {
  passwordStorage: { password: 'your-password' },
});

// Complete the backup storage
await backup.storageCallback();
console.log('Backup cipher text:', backup.cipherText);

recoverWallet

Recovers a wallet from a backup.
public async recoverWallet(
  cipherText: string,
  backupMethod: BackupMethods,
  backupConfigs?: BackupConfigs,
  progress?: ProgressCallback
): Promise<string>
Parameters
NameTypeDescription
cipherTextstringEncrypted backup data
backupMethodBackupMethodsBackup method used
backupConfigsBackupConfigsOptional backup configuration
progressProgressCallbackOptional progress callback
Returns Promise<string> - The recovered wallet address Example Usage
const address = await portal.recoverWallet('your-cipher-text', BackupMethods.password, {
  passwordStorage: { password: 'your-password' },
});

console.log('Wallet recovered:', address);

provisionWallet

Alias for recoverWallet. Provisions a wallet from a backup.
public async provisionWallet(
  cipherText: string,
  backupMethod: BackupMethods,
  backupConfigs: BackupConfigs,
  progress?: ProgressCallback
): Promise<string>

clearLocalWallet

Clears the local wallet data from device storage.
public async clearLocalWallet(): Promise<boolean>
Returns Promise<boolean> - true if successful Example Usage
const cleared = await portal.clearLocalWallet();
console.log('Wallet cleared:', cleared);

Wallet Status Methods

doesWalletExist

Checks if a wallet exists for the client.
public async doesWalletExist(chainId?: string): Promise<boolean>
Parameters
NameTypeDescription
chainIdstringOptional chain ID to check specific namespace (e.g., 'eip155:1')
Returns Promise<boolean> - true if wallet exists Example Usage
// Check if any wallet exists
const exists = await portal.doesWalletExist();

// Check for specific chain
const hasEthWallet = await portal.doesWalletExist('eip155:1');

isWalletOnDevice

Checks if wallet shares are stored on the current device.
public async isWalletOnDevice(chainId?: string): Promise<boolean>
Parameters
NameTypeDescription
chainIdstringOptional chain ID to check specific curve
Returns Promise<boolean> - true if wallet is on device

isWalletBackedUp

Checks if the wallet has been backed up.
public async isWalletBackedUp(chainId?: string): Promise<boolean>
Parameters
NameTypeDescription
chainIdstringOptional chain ID to check specific wallet
Returns Promise<boolean> - true if wallet is backed up

isWalletRecoverable

Checks if the wallet can be recovered.
public async isWalletRecoverable(chainId?: string): Promise<boolean>
Returns Promise<boolean> - true if wallet is recoverable

availableRecoveryMethods

Gets the available recovery methods for the wallet.
public async availableRecoveryMethods(chainId?: string): Promise<BackupMethods[]>
Returns Promise<BackupMethods[]> - Array of available backup methods Example Usage
const methods = await portal.availableRecoveryMethods();
console.log('Available recovery methods:', methods);
// e.g., ['GDRIVE', 'PASSWORD']

Address Methods

getEip155Address

Gets the EIP-155 (Ethereum-compatible) address.
public async getEip155Address(): Promise<string>
Returns Promise<string> - The Ethereum address Example Usage
const ethAddress = await portal.getEip155Address();
console.log('Ethereum address:', ethAddress);

getSolanaAddress

Gets the Solana address.
public async getSolanaAddress(): Promise<string>
Returns Promise<string> - The Solana address Example Usage
const solAddress = await portal.getSolanaAddress();
console.log('Solana address:', solAddress);

Eject Methods

Providing the custodian backup share to the client device puts both MPC shares on a single device, removing the multi-party security benefits of MPC. This operation should only be done for users who want to move off of MPC and into a single private key. Use portal.eject() or portal.ejectPrivateKeys() at your own risk!

eject

Ejects the SECP256K1 private key from MPC custody. For eject examples see here
public async eject(
  backupMethod: BackupMethods,
  backupConfigs: BackupConfigs,
  orgBackupShare?: string,
  clientBackupCipherText?: string
): Promise<EjectResult>
Parameters
NameTypeDescription
backupMethodBackupMethodsBackup method to use
backupConfigsBackupConfigsBackup configuration
orgBackupSharestringOrganization backup share (required if not using Portal backup)
clientBackupCipherTextstringClient backup cipher text (required if not using Portal backup)
Returns Promise<EjectResult> containing:
  • SECP256K1: The private key as a string

ejectPrivateKeys

Ejects all private keys (both SECP256K1 and ED25519) from MPC custody.
public async ejectPrivateKeys(
  backupMethod: BackupMethods,
  backupConfigs: BackupConfigs,
  orgBackupShares: OrgBackupShares,
  clientBackupCipherText?: string
): Promise<EjectPrivateKeysResult>
Parameters
NameTypeDescription
backupMethodBackupMethodsBackup method to use
backupConfigsBackupConfigsBackup configuration
orgBackupSharesOrgBackupSharesOrganization backup shares for both curves
clientBackupCipherTextstringClient backup cipher text (required if not using Portal backup)
Returns Promise<EjectPrivateKeysResult> containing:
  • SECP256K1: The SECP256K1 private key
  • ED25519: The ED25519 private key

Transaction Methods

request

Makes an RPC request to a blockchain network. This is the primary method for interacting with blockchains.
public async request(request: RequestArguments): Promise<any>
Parameters
NameTypeDescription
request.chainIdstringChain ID in CAIP-2 format (e.g., 'eip155:1')
request.methodstringRPC method name (e.g., 'eth_sendTransaction')
request.paramsanyMethod parameters
Returns Promise<any> - Response from the RPC call Example Usage
// Send Ethereum transaction
const txHash = await portal.request({
  chainId: 'eip155:1',
  method: 'eth_sendTransaction',
  params: [
    {
      from: portal.address,
      to: '0x...',
      value: '0xDE0B6B3A7640000', // 1 ETH in wei
    },
  ],
});

// Sign Solana transaction
const signature = await portal.request({
  chainId: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
  method: 'sol_signAndSendTransaction',
  params: [transaction],
});

sendAsset

Helper method to send assets to another address.
public async sendAsset(chain: string, params: SendAssetParams): Promise<SendAssetResponse>
Parameters
NameTypeDescription
chainstringChain ID or friendly name (e.g., 'ethereum', 'solana')
params.tostringRecipient address
params.tokenstringToken contract address or native token identifier
params.amountstringAmount to send
Returns Promise<SendAssetResponse> containing transaction hash and metadata Example Usage
const result = await portal.sendAsset('ethereum', {
  to: '0x...',
  token: '0x0000000000000000000000000000000000000000', // Native ETH
  amount: '1000000000000000000', // 1 ETH in wei
});

console.log('Transaction hash:', result.transactionHash);

sendSol

Helper method to send SOL tokens.
public async sendSol({
  chainId,
  to,
  lamports
}: {
  chainId: string
  to: string
  lamports: number
}): Promise<string>
Parameters
NameTypeDescription
chainIdstringSolana chain ID (must start with 'solana:')
tostringRecipient Solana address (44 characters)
lamportsnumberAmount in lamports (1 SOL = 1,000,000,000 lamports)
Returns Promise<string> - Transaction signature Example Usage
const signature = await portal.sendSol({
  chainId: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
  to: 'DYw8...',
  lamports: 1000000000, // 1 SOL
});

sendEth

Helper method to send ETH.
public sendEth = async ({
  chainId,
  to,
  value
}: {
  chainId: string
  to: string
  value: string
}): Promise<any>
Parameters
NameTypeDescription
chainIdstringEIP-155 chain ID
tostringRecipient address
valuestringAmount in wei (hex string)
Returns Promise<any> - Transaction hash Example Usage
const txHash = await portal.sendEth({
  chainId: 'eip155:1',
  to: '0x...',
  value: '0xDE0B6B3A7640000', // 1 ETH in wei
});

console.log('Transaction hash:', txHash);

rawSign

Signs data directly using the specified cryptographic curve.
public async rawSign(curve: PortalCurve, param: string): Promise<string>
Parameters
NameTypeDescription
curvePortalCurveCryptographic curve (ED25519 or SECP256K1)
paramstringData to sign
Returns Promise<string> - Signature Example Usage
import { PortalCurve } from '@portal-hq/web';

// Sign with SECP256K1 (Ethereum)
const signature = await portal.rawSign(PortalCurve.SECP256K1, 'your-data-to-sign');

console.log('Signature:', signature);

API Methods

getClient

Gets information about the client and their wallets.
public async getClient(): Promise<ClientResponse>
Returns Promise<ClientResponse> with client information including:
  • id: Client ID
  • address: Primary address
  • wallets: Array of wallet information
  • metadata: Namespace metadata with addresses
Example Usage
const client = await portal.getClient();
console.log('Client ID:', client.id);
console.log('Wallets:', client.wallets);

getAssets

Gets the assets (tokens) held by the wallet.
public async getAssets(chainId: string, includeNfts?: boolean): Promise<GetAssetsResponse>
Parameters
NameTypeDescription
chainIdstringChain ID to query
includeNftsbooleanWhether to include NFTs (default: false)
Returns Promise<GetAssetsResponse> with asset information Example Usage
const assets = await portal.getAssets('eip155:1', false);
console.log('Assets:', assets);

getNFTAssets

Gets NFT assets held by the wallet.
public async getNFTAssets(chainId: string): Promise<NFTAsset[]>
Parameters
NameTypeDescription
chainIdstringChain ID to query
Returns Promise<NFTAsset[]> - Array of NFT assets Example Usage
const nfts = await portal.getNFTAssets('eip155:1');
console.log('NFT assets:', nfts);

getTransactions

Gets transaction history for the wallet.
public async getTransactions(
  chainId: string,
  limit?: number,
  offset?: number,
  order?: GetTransactionsOrder
): Promise<Transaction[]>
Parameters
NameTypeDescription
chainIdstringChain ID to query
limitnumberMaximum number of transactions to return
offsetnumberNumber of transactions to skip
orderGetTransactionsOrderSort order: 'asc' or 'desc'
Returns Promise<Transaction[]> - Array of transactions Example Usage
import { GetTransactionsOrder } from '@portal-hq/web';

const txs = await portal.getTransactions('eip155:1', 10, 0, GetTransactionsOrder.DESC);

evaluateTransaction

Evaluates a transaction before execution to check if the transaction can be executed, and perform security validations.
public async evaluateTransaction(
  chainId: string,
  transaction: EvaluateTransactionParam,
  operationType?: EvaluateTransactionOperationType
): Promise<EvaluatedTransaction>
Parameters
NameTypeDescription
chainIdstringChain ID
transactionEvaluateTransactionParamTransaction to evaluate
operationTypeEvaluateTransactionOperationTypeType of evaluation (default: 'all')
Returns Promise<EvaluatedTransaction> with security analysis Example Usage
const evaluation = await portal.evaluateTransaction('eip155:1', {
  from: portal.address,
  to: '0x...',
  value: '0x1',
});

console.log('Security warnings:', evaluation.warnings);

buildTransaction

Builds a transaction for sending tokens.
public async buildTransaction(
  chainId: string,
  to: string,
  token: string,
  amount: string
): Promise<BuiltTransaction>
Parameters
NameTypeDescription
chainIdstringChain ID
tostringRecipient address
tokenstringToken contract address
amountstringAmount to send
Returns Promise<BuiltTransaction> with the built transaction object Example Usage
const builtTx = await portal.buildTransaction(
  'eip155:1',
  '0x...',
  '0x0000000000000000000000000000000000000000', // Native ETH
  '1000000000000000000' // 1 ETH in wei
);

// Use the built transaction
const txHash = await portal.request({
  chainId: 'eip155:1',
  method: 'eth_sendTransaction',
  params: [builtTx.transaction],
});

receiveTestnetAsset

Requests testnet assets from a faucet.
public async receiveTestnetAsset(chainId: string, params: FundParams): Promise<FundResponse>
Parameters
NameTypeDescription
chainIdstringTestnet chain ID
params.amountstringAmount to request
params.tokenstringToken identifier
Returns Promise<FundResponse> with funding details Example Usage
const fundResponse = await portal.receiveTestnetAsset('eip155:11155111', {
  amount: '1',
  token: 'ETH',
});

console.log('Transaction hash:', fundResponse.data?.txHash);
console.log('Explorer URL:', fundResponse.data?.explorerUrl);

Swap Methods

getQuote

Gets a quote for an in-chain token swap.
Deprecated: Use the portal.trading.zerox.getQuote method instead.
public async getQuote(
  apiKey: string,
  args: QuoteArgs,
  chainId: string
): Promise<QuoteResponse>

getSources

Gets available swap sources for in-chain swaps.
Deprecated: Use the portal.trading.zerox.getSources method instead.
public async getSources(apiKey: string, chainId: string): Promise<Record<string, string>>

Utility Methods

updateChain

Updates the current chain ID for the provider.
public updateChain(newChainId: string): void
Parameters
NameTypeDescription
newChainIdstringNew chain ID to set
Example Usage
portal.updateChain('eip155:137'); // Switch to Polygon

getRpcUrl

Gets the configured RPC URL for a chain.
public getRpcUrl(chainId?: string): string
Parameters
NameTypeDescription
chainIdstringChain ID to look up
Returns string - The RPC URL Throws Error if chain ID is not configured

storedClientBackupShare

Notifies Portal that a backup share has been stored.
public async storedClientBackupShare(success: boolean, backupMethod: BackupMethods): Promise<void>
Parameters
NameTypeDescription
successbooleanWhether the backup was successful
backupMethodBackupMethodsThe backup method that was used
Returns Promise<void> Example Usage
import { BackupMethods } from '@portal-hq/web';

// After successfully storing a backup
await portal.storedClientBackupShare(true, BackupMethods.gdrive);

Integration Classes

portal.yield (Yield)

The Yield class provides access to Yield.xyz integration for yield farming opportunities. Properties
PropertyTypeDescription
yieldXyzYieldXyzYield.xyz integration instance

portal.yield.yieldXyz (YieldXyz)

Access yield farming features through the Yield.xyz integration.

discover

Discovers available yield opportunities.
public async discover(data: YieldXyzGetYieldsRequest): Promise<YieldXyzGetYieldsResponse>
Parameters
NameTypeDescription
dataYieldXyzGetYieldsRequestParameters for yield discovery
Returns Promise<YieldXyzGetYieldsResponse> - Available yield opportunities Example Usage
const yields = await portal.yield.yieldXyz.discover({
  // Discovery parameters
});
console.log('Available yields:', yields);

getBalances

Retrieves yield balances for specified addresses and networks.
public async getBalances(data: YieldXyzGetBalancesRequest): Promise<YieldXyzGetBalancesResponse>
Parameters
NameTypeDescription
dataYieldXyzGetBalancesRequestRequest parameters including addresses and networks
Returns Promise<YieldXyzGetBalancesResponse> - Balance information

getHistoricalActions

Retrieves historical yield actions with optional filtering.
public async getHistoricalActions(
  data: YieldXyzGetHistoricalActionsRequest
): Promise<YieldXyzGetHistoricalActionsResponse>
Returns Promise<YieldXyzGetHistoricalActionsResponse> - Historical actions

enter

Enters a yield opportunity.
public async enter(data: YieldXyzEnterRequest): Promise<YieldXyzEnterYieldResponse>
Parameters
NameTypeDescription
dataYieldXyzEnterRequestParameters for entering a yield opportunity
Returns Promise<YieldXyzEnterYieldResponse> - Action details Example Usage
const result = await portal.yield.yieldXyz.enter({
  // Enter parameters
});

exit

Exits a yield opportunity.
public async exit(data: YieldXyzExitRequest): Promise<YieldXyzExitResponse>
Parameters
NameTypeDescription
dataYieldXyzExitRequestParameters for exiting a yield opportunity
Returns Promise<YieldXyzExitResponse> - Action details

manage

Manages a yield opportunity with specified parameters.
public async manage(data: YieldXyzManageYieldRequest): Promise<YieldXyzManageYieldResponse>
Parameters
NameTypeDescription
dataYieldXyzManageYieldRequestParameters for managing a yield opportunity
Returns Promise<YieldXyzManageYieldResponse> - Action details

track

Tracks a transaction by submitting its hash.
public async track(data: YieldXyzTrackTransactionRequest): Promise<YieldXyzTrackTransactionResponse>
Parameters
NameTypeDescription
data.transactionIdstringThe ID of the transaction to track
data.txHashstringThe hash of the transaction to submit
Returns Promise<YieldXyzTrackTransactionResponse> - Tracking confirmation

getTransaction

Retrieves a single yield action transaction by its ID.
public async getTransaction(transactionId: string): Promise<YieldXyzGetTransactionResponse>
Parameters
NameTypeDescription
transactionIdstringThe transaction ID to retrieve
Returns Promise<YieldXyzGetTransactionResponse> - Transaction details

portal.trading (Trading)

The Trading class provides access to:
  • Li.Fi integration for cross-chain swaps and bridges
  • 0x integration for in-chain swaps
Properties
PropertyTypeDescription
lifiLiFiLi.Fi integration instance
zeroXZeroX0x integration instance

portal.trading.lifi (LiFi)

Access cross-chain swap and bridge features through the Li.Fi integration.

getRoutes

Retrieves available routes for cross-chain swaps and bridges.
public async getRoutes(data: LifiRoutesRequest): Promise<LifiRoutesResponse>
Parameters
NameTypeDescription
dataLifiRoutesRequestParameters for route discovery
Returns Promise<LifiRoutesResponse> - Available routes Example Usage
const routes = await portal.trading.lifi.getRoutes({
  fromChainId: 1,
  toChainId: 137,
  fromTokenAddress: '0x...',
  toTokenAddress: '0x...',
  fromAmount: '1000000000000000000',
});
console.log('Available routes:', routes);

getQuote

Retrieves a quote for a swap or bridge operation.
public async getQuote(data: LifiQuoteRequest): Promise<LifiQuoteResponse>
Parameters
NameTypeDescription
dataLifiQuoteRequestParameters for the quote request
Returns Promise<LifiQuoteResponse> - Quote details including fees and estimated time Example Usage
const quote = await portal.trading.lifi.getQuote({
  fromChain: '1',
  toChain: '137',
  fromToken: '0x...',
  toToken: '0x...',
  fromAmount: '1000000000000000000',
  fromAddress: portal.address,
});

getStatus

Retrieves the status of a cross-chain transaction.
public async getStatus(data: LifiStatusRequest): Promise<LifiStatusResponse>
Parameters
NameTypeDescription
dataLifiStatusRequestStatus request parameters including transaction hash
Returns Promise<LifiStatusResponse> - Transaction status Example Usage
const status = await portal.trading.lifi.getStatus({
  txHash: '0x...',
  bridge: 'hop',
});
console.log('Transaction status:', status.status);

getRouteStep

Retrieves an unsigned transaction for a specific route step.
public async getRouteStep(data: LifiStepTransactionRequest): Promise<LifiStepTransactionResponse>
Parameters
NameTypeDescription
dataLifiStepTransactionRequestStep transaction request with step details
Returns Promise<LifiStepTransactionResponse> - Unsigned transaction ready to be signed Example Usage
const step = await portal.trading.lifi.getRouteStep({
  route: selectedRoute,
  stepIndex: 0,
});

// Sign and send the transaction
const txHash = await portal.request({
  chainId: 'eip155:1',
  method: 'eth_sendTransaction',
  params: [step.transactionRequest],
});

portal.trading.zeroX (0x)

getQuote

Gets a quote for an in-chain token swap.
public async getQuote(
  apiKey: string,
  args: QuoteArgs,
  chainId: string
): Promise<QuoteResponse>

getSources

Gets available swap sources for in-chain swaps.
public async getSources(apiKey: string, chainId: string): Promise<Record<string, string>>

Deprecated Methods

The following methods are deprecated. Use portal.request() instead.

ethEstimateGas

Deprecated: Use portal.request({ method: 'eth_estimateGas', ... }) instead.
public async ethEstimateGas(chainId: string, transaction: EthereumTransaction): Promise<any>

ethGasPrice

Deprecated: Use portal.request({ method: 'eth_gasPrice', ... }) instead.
public async ethGasPrice(chainId: string): Promise<string>

ethGetBalance

Deprecated: Use portal.request({ method: 'eth_getBalance', ... }) instead.
public async ethGetBalance(chainId: string): Promise<string>

ethSendTransaction

Deprecated: Use portal.request({ method: 'eth_sendTransaction', ... }) instead.
public async ethSendTransaction(chainId: string, transaction: EthereumTransaction): Promise<string>

ethSignTransaction

Deprecated: Use portal.request({ method: 'eth_signTransaction', ... }) instead.
public async ethSignTransaction(chainId: string, transaction: EthereumTransaction): Promise<string>

ethSignTypedData

Deprecated: Use portal.request({ method: 'eth_signTypedData', ... }) instead.
public async ethSignTypedData(chainId: string, data: TypedData): Promise<string>

ethSignTypedDataV3

Deprecated: Use portal.request({ method: 'eth_signTypedData_v3', ... }) instead.
public async ethSignTypedDataV3(chainId: string, data: TypedData): Promise<string>

ethSignTypedDataV4

Deprecated: Use portal.request({ method: 'eth_signTypedData_v4', ... }) instead.
public async ethSignTypedDataV4(chainId: string, data: TypedData): Promise<string>

personalSign

Deprecated: Use portal.request({ method: 'personal_sign', ... }) instead.
public async personalSign(chainId: string, message: string): Promise<string>

getBalances

Deprecated: Use portal.getAssets() instead.
public async getBalances(chainId: string): Promise<Balance[]>

getNFTs

Deprecated: Use portal.getNFTAssets() instead.
public async getNFTs(chainId: string): Promise<NFT[]>

simulateTransaction

Deprecated: Use portal.evaluateTransaction() instead.
public async simulateTransaction(
  chainId: string,
  transaction: SimulateTransactionParam
): Promise<SimulatedTransaction>