ReferenceAPI ReferenceAmp
Wallet Amp
Wallet Amp.
Request
interface AmpWalletRequest {
action: 'add'
resource: '/amp/wallets'
details: {
descriptor: string
}
}Prop
Type
Response
interface AmpWalletResponse_success {
status: 'success'
error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
message?: string | undefined
details: {
wid: string
descriptor: string
}
metadata: unknown
}Prop
Type
Example
import { AmpActionsSchema } from '@blockstream/amp-js-sdk'
import { broadcastRequest } from './broadcaster'
const response = await broadcastRequest<
typeof AmpActionsSchema.shape.wallet
>(
{
action: 'add',
resource: '/amp/wallets',
details: {
// TODO: fill in required fields
},
},
blockstream,
)