Skip to content
GitHub

Wallet address keys

Creating a public-private key pair for each wallet address is not required when integrating with Rafiki.

You only need to create key pairs for wallet addresses if you want to allow your account holders to use/be Open Payments clients under their wallet addresses. For more information, review the Open Payments documentation about clients and client keys.

Create a wallet address key pair

Use the createWalletAddressKey GraphQL mutation to create a key pair and associate it with a wallet address.

mutation CreateWalletAddressKey($input: CreateWalletAddressKeyInput!) {
createWalletAddressKey(input: $input) {
code
message
success
walletAddressKey {
id
walletAddressId
revoked
jwk {
alg
crv
kid
kty
x
}
createdAt
}
}
}

Revoke a wallet address key

Use the revokeWalletAddressKey GraphQL mutation to revoke a public key associated with a wallet address. Open Payments requests using this key for request signatures will be denied going forward.

mutation RevokeWalletAddressKey($input: RevokeWalletAddressKeyInput!) {
revokeWalletAddressKey(input: $input) {
walletAddressKey {
id
revoked
walletAddressId
createdAt
}
}
}