Create a wallet
When creating a wallet, set itsentity to the organization:
Overriding the default owner
Whenentity identifies an organization, the wallet owner is automatically set to the organization’s default_key_quorum_id.
To override the organization’s default for a specific wallet, you may pass owner_id or owner when creating the wallet. Updating an organization’s default_key_quorum_id only affects wallets created thereafter. Existing wallets keep the owner they were created with, and changing that owner follows the enclave’s ownership update semantics.
Applying default wallet configurations
If the organization has default wallet configurations, Privy applies the entry for the new wallet’s chain type at creation. Movement wallets use theaptos entry.
Privy applies each field separately:
- If the request omits
policy_ids, the wallet uses the organization’s defaultpolicy_ids. - If the request omits
additional_signers, the wallet uses the organization’s defaultadditional_signers, including each signer’soverride_policy_ids. - If the request sets a field, the request value replaces the default. An empty array (
[]) creates the wallet without that field’s defaults.
If the request uses the legacy
authorization_key_ids or authorization_threshold fields, Privy
does not add the default additional_signers. The default policy_ids still apply. Imports that
recover an existing wallet do not receive defaults.400 error and no wallet is created.
Fetch an organization’s wallets
Filter wallets by the organization’s ID:Assign an existing wallet
If the wallet already exists and is not already assigned to an entity, you can assign it to the organization. Assigning an entity after creation does not change the wallet’s owner. The default key quorum is only applied at creation time.Configuring policies
In addition to the wallet’s owner, you may also create policies for the organization and assign them to the wallet via thepolicy_ids field of the wallet creation request. This enables you to configure guardrails around the signatures and transactions that can be executed by an organization’s wallets. To apply the same policy to every new wallet of a chain type, set it in the organization’s default wallet configurations.
After a wallet is created, organizations may update the policy for their wallet, but it will require approval from the default key quorum for the organization (the wallet owner).
Configuring access control [optional]
To provision access to organization members beyond the default key quorum, your app may create additional key quorums to model other users within the organization. You might consider creating a key quorum for each distinct permission you’d like to assign (e.g. permission to send < 1000 OUSD), and you can add the users that should have that permission to the corresponding key quorum. Then, when creating a wallet, the organization may specify these lower-privilege key quorums asadditional_signers, with scoped permissions defined by their override_policy_ids. These key quorums have the ability to authorize signatures and transactions within the scope of their policy, but not to manage the wallet’s configuration. To provision these signers on every new wallet of a chain type, set them in the organization’s default wallet configurations.
