/api/v1/forward-to-vaultForward Bitcoin to a vault
Moves Bitcoin from the caller's signing profile into one of the workspace's vaults, returning a transaction proposal for the caller to sign, and recording the movement in the audit log.
PAYMENT_INITPurchased Bitcoin arrives at the member's own profile address, which only that
member can spend from. This call moves it on into a vault, and it does so as a
normal transaction proposal rather than as a special case: the response carries a
psbt_id and the unsigned PSBT, which you sign and submit through
POST /api/v1/sign-psbt. Because spending from a signing profile
needs only its owner's signature, you approve this proposal alone. The movement is
recorded in the
audit log.
wallet_address names the profile address to forward from. Read it from
GET /api/v1/signing-profile-address: where a
member has several registered keys, that address is what identifies which key is
meant, and if your application and the platform disagree about it the request is
rejected rather than guessed. The destination vault must be one of the workspace's
own vaults, which GET /api/v1/list-wallets lists.
Send amount_sats to forward a fixed amount, or sweep set to true to move
the whole balance of the profile address. fee_sats is required in both cases.
Set allow_unconfirmed to true to let the forward chain off a deposit that has
not confirmed yet, for example a purchase MoonPay has only just sent.
workspace_idnumberrequiredvault_idstringrequirednetworkstringrequiredamount_satsnumberoptionalfee_satsnumberrequiredsweepbooleanoptionalallow_unconfirmedbooleanoptionalwallet_addressstringoptional#What happens next
Sign the PSBT with the key your profile address is derived from and submit it
through POST /api/v1/sign-psbt. Yours is the only approval the
proposal needs, so it is finalised and submitted to the Bitcoin network as soon as
your signature is recorded, and that is irreversible.
GET /api/v1/psbt shows the proposal's status and its Bitcoin
transaction id once broadcast, and the coins then count towards the vault's
balance.