Aave V4 Tokenization Spoke reads — ERC-4626 share accounting plus V4 metadata.
Each Tokenization Spoke is a supply-only ERC-4626 vault for one {Hub, asset}
pair. Resolve a configured spoke with lookup/3, then pass that address to
the read functions. Amounts stay raw integers (token units / shares).
Error Format
Errors pass through from the underlying module that failed:
| Source | Error Shape |
|---|---|
lookup/3 | {:error, {:unknown_hub, hub}}, {:error, {:unknown_tokenization_spoke, {hub, asset}}}, {:error, {:unsupported_network, network}} |
Onchain.Address.validate/1 | {:error, {:invalid_address, input}} |
Onchain.Contract.call/5 | {:error, {:encode_error, ...}}, {:error, {:rpc_error, ...}}, {:error, {:decode_error, ...}} |
Functions
| Function | Purpose |
|---|---|
lookup/3 | Resolve a configured spoke by {hub, asset} |
asset/2 | Underlying ERC-20 |
total_assets/2 | Assets managed by the vault |
total_supply/2 | Share token supply |
balance_of/3 | Share balance of an owner |
convert_to_shares/3 | Ideal assets → shares |
convert_to_assets/3 | Ideal shares → assets |
preview_deposit/3 | Shares minted for a deposit |
preview_mint/3 | Assets required to mint shares |
preview_withdraw/3 | Shares burned to withdraw assets |
preview_redeem/3 | Assets returned when redeeming shares |
max_deposit/3 | Deposit cap for a receiver |
max_mint/3 | Mint cap for a receiver |
max_withdraw/3 | Withdrawable assets for an owner |
max_redeem/3 | Redeemable shares for an owner |
hub/2 | Associated Hub |
asset_id/2 | Hub asset identifier |
max_allowed_spoke_cap/2 | Protocol spoke-cap bound |
permit_nonce_namespace/2 | EIP-2612 permit nonce key |
deposit_typehash/2 | Deposit intent typehash |
mint_typehash/2 | Mint intent typehash |
withdraw_typehash/2 | Withdraw intent typehash |
redeem_typehash/2 | Redeem intent typehash |
permit_typehash/2 | Share-token permit typehash |
domain_separator/2 | EIP-712 domain separator |
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
domain_separator | 2 | EIP-712 domain separator for this Tokenization Spoke. | spoke: value, opts: value |
permit_typehash | 2 | EIP-712 typehash for the share-token permit. | spoke: value, opts: value |
redeem_typehash | 2 | EIP-712 typehash for the redeem intent. | spoke: value, opts: value |
withdraw_typehash | 2 | EIP-712 typehash for the withdraw intent. | spoke: value, opts: value |
mint_typehash | 2 | EIP-712 typehash for the mint intent. | spoke: value, opts: value |
deposit_typehash | 2 | EIP-712 typehash for the deposit intent. | spoke: value, opts: value |
permit_nonce_namespace | 2 | Nonce namespace used for share-token EIP-2612 permits. | spoke: value, opts: value |
max_allowed_spoke_cap | 2 | Maximum allowed spoke cap (ITokenizationSpoke constant). | spoke: value, opts: value |
asset_id | 2 | Hub asset identifier for this Tokenization Spoke. | spoke: value, opts: value |
hub | 2 | Hub this Tokenization Spoke is bound to. | spoke: value, opts: value |
max_redeem | 3 | Maximum shares an owner can redeem. | spoke: value, owner: value, opts: value |
max_withdraw | 3 | Maximum assets an owner can withdraw. | spoke: value, owner: value, opts: value |
max_mint | 3 | Maximum shares that can be minted for a receiver. | spoke: value, receiver: value, opts: value |
max_deposit | 3 | Maximum assets a receiver can deposit. | spoke: value, receiver: value, opts: value |
preview_redeem | 3 | Assets that would be returned when redeeming the given shares. | spoke: value, shares: value, opts: value |
preview_withdraw | 3 | Shares that would be burned to withdraw the given assets. | spoke: value, assets: value, opts: value |
preview_mint | 3 | Assets that would be deposited to mint the given shares. | spoke: value, shares: value, opts: value |
preview_deposit | 3 | Shares that would be minted for a deposit at the current block. | spoke: value, assets: value, opts: value |
convert_to_assets | 3 | Ideal asset amount exchanged for the given shares. | spoke: value, shares: value, opts: value |
convert_to_shares | 3 | Ideal share amount exchanged for the given assets. | spoke: value, assets: value, opts: value |
balance_of | 3 | Vault share balance of an owner. | spoke: value, owner: value, opts: value |
total_supply | 2 | Total supply of vault share tokens. | spoke: value, opts: value |
total_assets | 2 | Total underlying assets managed by the vault. | spoke: value, opts: value |
asset | 2 | Underlying ERC-20 of a Tokenization Spoke. | spoke: value, opts: value |
lookup | 3 | Resolve a configured V4 Tokenization Spoke by {hub, asset}. | hub: value, asset: value, opts: value |
Summary
Functions
Underlying ERC-20 of a Tokenization Spoke.
Hub asset identifier for this Tokenization Spoke.
Vault share balance of an owner.
Ideal asset amount exchanged for the given shares.
Ideal share amount exchanged for the given assets.
EIP-712 typehash for the deposit intent.
EIP-712 domain separator for this Tokenization Spoke.
Hub this Tokenization Spoke is bound to.
Resolve a configured V4 Tokenization Spoke by {hub, asset}.
Maximum allowed spoke cap (ITokenizationSpoke constant).
Maximum assets a receiver can deposit.
Maximum shares that can be minted for a receiver.
Maximum shares an owner can redeem.
Maximum assets an owner can withdraw.
EIP-712 typehash for the mint intent.
Nonce namespace used for share-token EIP-2612 permits.
EIP-712 typehash for the share-token permit.
Shares that would be minted for a deposit at the current block.
Assets that would be deposited to mint the given shares.
Assets that would be returned when redeeming the given shares.
Shares that would be burned to withdraw the given assets.
EIP-712 typehash for the redeem intent.
Total underlying assets managed by the vault.
Total supply of vault share tokens.
EIP-712 typehash for the withdraw intent.
Types
Functions
Underlying ERC-20 of a Tokenization Spoke.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Checksummed underlying address ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "Checksummed underlying address"
}
}
@spec asset_id( String.t() | binary(), keyword() ) :: {:ok, non_neg_integer()} | {:error, term()}
Hub asset identifier for this Tokenization Spoke.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Asset identifier ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Asset identifier"
}
}
@spec balance_of(String.t() | binary(), String.t() | binary(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Vault share balance of an owner.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)owner- Account address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Share balance ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
owner: %{
description: "Account address as 0x hex string or 20-byte binary",
kind: :value
},
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Share balance"
}
}
@spec convert_to_assets(String.t() | binary(), non_neg_integer(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Ideal asset amount exchanged for the given shares.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)shares- Share token amount (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Assets (token units) ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
},
shares: %{description: "Share token amount", kind: :value}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Assets (token units)"
}
}
EIP-712 typehash for the deposit intent.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
0x-prefixed bytes32 ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "0x-prefixed bytes32"
}
}
EIP-712 domain separator for this Tokenization Spoke.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
0x-prefixed bytes32 ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "0x-prefixed bytes32"
}
}
Hub this Tokenization Spoke is bound to.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Checksummed Hub address ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "Checksummed Hub address"
}
}
Resolve a configured V4 Tokenization Spoke by {hub, asset}.
Parameters
hub- Hub atom: :core, :prime, or :plus (value)asset- Underlying asset atom, e.g. :weth, :usdc, :pt_susde (value)opts- Options: [network: :ethereum] (default:[], value)
Returns
Checksummed Tokenization Spoke address ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: [network: :ethereum]",
kind: :value
},
asset: %{
description: "Underlying asset atom, e.g. :weth, :usdc, :pt_susde",
kind: :value
},
hub: %{description: "Hub atom: :core, :prime, or :plus", kind: :value}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "Checksummed Tokenization Spoke address",
example: "0x7320CF22Ac095bA2a2e0a652F77efB836c2E751b"
}
}
@spec max_allowed_spoke_cap( String.t() | binary(), keyword() ) :: {:ok, non_neg_integer()} | {:error, term()}
Maximum allowed spoke cap (ITokenizationSpoke constant).
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Cap bound (uint40) ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Cap bound (uint40)"
}
}
@spec max_deposit(String.t() | binary(), String.t() | binary(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Maximum assets a receiver can deposit.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)receiver- Account address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Max deposit (token units) ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
receiver: %{
description: "Account address as 0x hex string or 20-byte binary",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Max deposit (token units)"
}
}
@spec max_mint(String.t() | binary(), String.t() | binary(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Maximum shares that can be minted for a receiver.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)receiver- Account address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Max shares minted ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
receiver: %{
description: "Account address as 0x hex string or 20-byte binary",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Max shares minted"
}
}
@spec max_redeem(String.t() | binary(), String.t() | binary(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Maximum shares an owner can redeem.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)owner- Account address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Max shares redeemed ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
owner: %{
description: "Account address as 0x hex string or 20-byte binary",
kind: :value
},
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Max shares redeemed"
}
}
@spec max_withdraw(String.t() | binary(), String.t() | binary(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Maximum assets an owner can withdraw.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)owner- Account address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Max withdraw (token units) ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
owner: %{
description: "Account address as 0x hex string or 20-byte binary",
kind: :value
},
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Max withdraw (token units)"
}
}
EIP-712 typehash for the mint intent.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
0x-prefixed bytes32 ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "0x-prefixed bytes32"
}
}
@spec permit_nonce_namespace( String.t() | binary(), keyword() ) :: {:ok, non_neg_integer()} | {:error, term()}
Nonce namespace used for share-token EIP-2612 permits.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Permit nonce key (uint192) ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Permit nonce key (uint192)"
}
}
EIP-712 typehash for the share-token permit.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
0x-prefixed bytes32 ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "0x-prefixed bytes32"
}
}
@spec preview_deposit(String.t() | binary(), non_neg_integer(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Shares that would be minted for a deposit at the current block.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)assets- Asset amount in token units (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Shares minted ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
assets: %{description: "Asset amount in token units", kind: :value},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Shares minted"
}
}
@spec preview_mint(String.t() | binary(), non_neg_integer(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Assets that would be deposited to mint the given shares.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)shares- Share token amount (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Assets deposited ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
},
shares: %{description: "Share token amount", kind: :value}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Assets deposited"
}
}
@spec preview_redeem(String.t() | binary(), non_neg_integer(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Assets that would be returned when redeeming the given shares.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)shares- Share token amount (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Assets returned ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
},
shares: %{description: "Share token amount", kind: :value}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Assets returned"
}
}
@spec preview_withdraw(String.t() | binary(), non_neg_integer(), keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Shares that would be burned to withdraw the given assets.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)assets- Asset amount in token units (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Shares burned ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
assets: %{description: "Asset amount in token units", kind: :value},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Shares burned"
}
}
EIP-712 typehash for the redeem intent.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
0x-prefixed bytes32 ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "0x-prefixed bytes32"
}
}
@spec total_assets( String.t() | binary(), keyword() ) :: {:ok, non_neg_integer()} | {:error, term()}
Total underlying assets managed by the vault.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Managed assets (token units) ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Managed assets (token units)"
}
}
@spec total_supply( String.t() | binary(), keyword() ) :: {:ok, non_neg_integer()} | {:error, term()}
Total supply of vault share tokens.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
Share token supply ({:ok, non_neg_integer()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, non_neg_integer()} | {:error, term()}",
description: "Share token supply"
}
}
EIP-712 typehash for the withdraw intent.
Parameters
spoke- Tokenization Spoke address as 0x hex string or 20-byte binary (value)opts- Options: :network (default :ethereum), :rpc_url, :timeout, :block (default:[], value)
Returns
0x-prefixed bytes32 ({:ok, String.t()} | {:error, term()})
# descripex:contract
%{
params: %{
opts: %{
default: [],
description: "Options: :network (default :ethereum), :rpc_url, :timeout, :block",
kind: :value
},
spoke: %{
description: "Tokenization Spoke address as 0x hex string or 20-byte binary",
kind: :value
}
},
returns: %{
type: "{:ok, String.t()} | {:error, term()}",
description: "0x-prefixed bytes32"
}
}