Initializes a new Wallet Address instance.
The address model data.
Optional
key: WalletThe ethers.js SigningKey the Address uses to sign data.
If the address model is empty.
Protected
Optional
_reputationProtected
idPrivate
Optional
keyPrivate
modelProtected
networkPrivate
broadcastPrivate
A helper function that broadcasts the signed payload.
The staking operation id related to the signed payload.
The payload that's being broadcasted.
The index of the transaction in the array from the staking operation.
An updated staking operation with the broadcasted transaction.
Get the claimable balance for the supplied asset.
The asset to check claimable balance for.
The staking mode. Defaults to DEFAULT.
Additional options for getting the claimable balance.
The claimable balance.
Private
copyCreates a staking operation to claim stake.
The amount to claim stake.
The asset to claim stake.
The staking mode. Defaults to DEFAULT.
Additional options for the claim stake operation.
A. Shared ETH Staking
integrator_contract_address
(optional): The contract address to which the claim stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.The amount to wait for the transaction to complete when broadcasted.
The amount to check each time for a successful broadcast.
The staking operation after it's completed successfully.
Private
createCreates a contract invocation with the given data.
The address of the contract the method will be invoked on.
The method to invoke on the contract.
The ABI of the contract.
The arguments to pass to the contract method invocation. The keys should be the argument names and the values should be the argument values.
Optional
atomicAmount: stringThe atomic amount of the native asset to send to a payable contract method.
The ContractInvocation object.
if the API request to create a contract invocation fails.
Private
createPrivate
Creates a custom contract.
The options for creating the custom contract.
A Promise that resolves to the created SmartContract.
If the API request to compile or subsequently create a smart contract fails.
Private
createERC1155Private
Creates an ERC1155 multi-token contract.
The options for creating the ERC1155 token.
A Promise that resolves to the created SmartContract.
If the API request to create a smart contract fails.
Private
createERC20Private
Creates an ERC20 token contract.
The options for creating the ERC20 token.
A Promise that resolves to the created SmartContract.
If the API request to create a smart contract fails.
Private
createERC721Creates an ERC721 token contract.
The options for creating the ERC721 token.
A Promise that resolves to the deployed SmartContract object.
If the private key is not loaded when not using server signer.
Creates a Payload Signature.
The Unsigned Payload to sign.
A promise that resolves to the Payload Signature object.
if the API request to create a Payload Signature fails.
if the address does not have a private key loaded or an associated Server-Signer.
Creates a staking operation to stake.
The amount to stake.
The asset to stake.
The staking mode. Defaults to DEFAULT.
Additional options for the stake operation:
A. Shared ETH Staking
integrator_contract_address
(optional): The contract address to which the stake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.B. Dedicated ETH Staking
funding_address
(optional): Ethereum address for funding the stake operation. Defaults to the address initiating the stake operation.withdrawal_address
(optional): Ethereum address for receiving rewards and withdrawal funds. Defaults to the address initiating the stake operation.fee_recipient_address
(optional): Ethereum address for receiving transaction fees. Defaults to the address initiating the stake operation.The amount to wait for the transaction to complete when broadcasted.
The amount to check each time for a successful broadcast.
The staking operation after it's completed successfully.
Private
createCreates a staking operation to stake, signs it, and broadcasts it on the blockchain.
The amount for the staking operation.
The asset to the staking operation.
The type of staking action to perform.
The staking mode. Defaults to DEFAULT.
Additional options such as setting the mode for the staking action.
The amount to wait for the transaction to complete when broadcasted.
The amount to check each time for a successful broadcast.
The staking operation after it's completed fully.
if the API request to create or broadcast staking operation fails.
if the amount is less than zero.
Private
createPrivate
A helper function that creates the staking operation.
The amount for the staking operation.
The asset for the staking operation.
The type of staking action to perform.
The staking mode. Defaults to DEFAULT.
Additional options such as setting the mode for the staking action.
The created staking operation.
if the API request to create staking operation fails.
Trades the given amount of the given Asset for another Asset. Only same-network Trades are supported.
The options to create the Trade.
The Trade object.
if the API request to create or broadcast a Trade fails.
if the Trade times out.
Private
createTransfers the given amount of the given Asset to the given address.
Only same-Network Transfers are supported.
This returns a Transfer
object that has been signed and broadcasted, you
can wait for this to land on-chain (or fail) by calling transfer.wait()
.
The options to create the Transfer.
The transfer object.
if the API request to create a Transfer fails.
if the API request to broadcast a Transfer fails.
Creates a staking operation to unstake.
The amount to unstake.
The asset to unstake.
The staking mode. Defaults to DEFAULT.
Additional options for the unstake operation:
A. Shared ETH Staking
integrator_contract_address
(optional): The contract address to which the unstake operation is directed to. Defaults to the integrator contract address associated with CDP account (if available) or else defaults to a shared integrator contract address for that network.B. Dedicated ETH Staking
immediate
(optional): Set this to "true" to unstake immediately i.e. leverage "Coinbase managed unstake" process . Defaults to "false" i.e. "User managed unstake" process.validator_pub_keys
(optional): List of comma separated validator public keys to unstake. Defaults to validators being picked up on your behalf corresponding to the unstake amount.The amount to wait for the transaction to complete when broadcasted.
The amount to check each time for a successful broadcast.
The staking operation after it's completed successfully.
Deploys a custom contract.
The options for creating the custom contract.
A Promise that resolves to the deployed SmartContract object.
If the API request to create a smart contract fails.
Deploys an ERC1155 multi-token contract.
The options for creating the ERC1155 token.
A Promise that resolves to the deployed SmartContract object.
If the API request to create a smart contract fails.
Deploys an ERC721 token contract.
The options for creating the ERC721 token.
A Promise that resolves to the deployed SmartContract object.
If the API request to create a smart contract fails.
Deploys an ERC20 token contract.
The options for creating the ERC20 token.
A Promise that resolves to the deployed SmartContract object.
If the API request to create a smart contract fails.
Requests faucet funds for the address. Only supported on testnet networks.
Optional
assetId: stringThe ID of the asset to transfer from the faucet.
The faucet transaction object.
If the request does not return a transaction hash.
If the request fails.
Fund the address from your account on the Coinbase Platform.
The options to create the fund operation
The created fund operation object
Private
getReturns the address and network ID of the given destination.
The destination to get the address and network ID of.
The address and network ID of the destination.
Gets a Payload Signature.
The ID of the Payload Signature to fetch.
A promise that resolves to the Payload Signature object.
if the API request to get the Payload Signature fails.
Private
getLists the historical staking balances for the address.
The asset ID.
The start time.
The end time.
The staking balances.
Invokes a contract with the given data.
The options to invoke the contract
The ContractInvocation object.
if the API request to create a contract invocation fails.
if the address cannot sign.
if the address does not have sufficient balance.
Returns the list of balances for the address.
The map from asset ID to balance.
Returns all the fund operations associated with the address.
The pagination options.
The paginated list response of fund operations.
Returns the historical balances of the provided asset.
The asset ID.
The pagination options.
The paginated list response of Historical Balances for the given Asset ID.
Lists all the Payload Signatures associated with the Address.
The pagination options.
A promise that resolves to the paginated list response of Payload Signatures.
if the API request to list the Payload Signatures fails.
Returns all the trades associated with the address.
The pagination options.
The paginated list response of trades.
Returns the transactions of the address.
The pagination options.
The paginated list response of Transactions.
Returns all the transfers associated with the address.
The pagination options.
The paginated list response of transfers.
Get the pending claimable balance for the supplied asset.
The asset to check pending claimable balance for.
The staking mode. Defaults to DEFAULT.
Additional options for getting the pending claimable balance.
The pending claimable balance.
Get a quote for funding the address from your Coinbase platform account.
The options to create the fund quote
The fund quote object
Returns the reputation of the Address.
The reputation of the Address.
if the API request to get the Address reputation fails.
if the Address reputation is not available.
Get the stakeable balance for the supplied asset.
The asset to check the stakeable balance for.
The staking mode. Defaults to DEFAULT.
Additional options for getting the stakeable balance.
The stakeable balance.
Lists the staking rewards for the address.
The asset ID.
The start time.
The end time.
The format to return the rewards in. (usd, native). Defaults to usd.
The staking rewards.
Get the unstakeable balance for the supplied asset.
The asset to check the unstakeable balance for.
The staking mode. Defaults to DEFAULT.
Additional options for getting the unstakeable balance. A. Dedicated ETH Staking
validator_pub_keys
(optional): List of comma separated validator public keys to retrieve unstakeable balance for. Defaults to all validators.The unstakeable balance.
Private
validatePrivate
Validate if the operation is able to claim stake with the supplied input.
The amount of the asset to claim stake.
The asset to claim stake.
The staking mode. Defaults to DEFAULT.
Additional options for the claim stake operation.
If the supplied input is not able to create a claim stake operation.
Private
validatePrivate
Validate if the operation is able to stake with the supplied input.
The amount of the asset to stake.
The asset to stake.
The staking mode. Defaults to DEFAULT.
Additional options for the stake operation.
If the supplied input is not able to create a stake operation.
Private
validateChecks if trading is possible and raises an error if not.
The amount of the Asset to send.
The ID of the Asset to trade from. For Ether, eth, gwei, and wei are supported.
If the private key is not loaded, or if the asset IDs are unsupported, or if there are insufficient funds.
Private
validatePrivate
Validate if the operation is able to unstake with the supplied input.
The amount of the asset to unstake.
The asset to unstake.
The staking mode. Defaults to DEFAULT.
Additional options for the unstake operation.
If the supplied input is not able to create an unstake operation.
A representation of a blockchain address, which is a wallet-controlled account on a network.