Account Service
API Reference
Open Direct API Reference Page
Path Table
Method | Path | Description |
---|---|---|
GET | /v2/accounts/siwf | Get the Sign In With Frequency Redirect URL |
POST | /v2/accounts/siwf | Process the result of a Sign In With Frequency v2 callback |
GET | /v1/accounts/siwf | Get the Sign In With Frequency configuration |
POST | /v1/accounts/siwf | Request to Sign In With Frequency |
GET | /v1/accounts/{msaId} | Fetch an account given an MSA Id |
GET | /v1/accounts/account/{accountId} | Fetch an account given an Account Id |
GET | /v1/accounts/retireMsa/{accountId} | Get a retireMsa unsigned, encoded extrinsic payload. |
POST | /v1/accounts/retireMsa | Request to retire an MSA ID. |
GET | /v2/delegations/{msaId} | Get all delegation information associated with an MSA Id |
GET | /v2/delegations/{msaId}/{providerId} | Get an MSA's delegation information for a specific provider |
GET | /v1/delegation/{msaId} | Get the delegation information associated with an MSA Id |
GET | /v1/delegation/revokeDelegation/{accountId}/{providerId} | Get a properly encoded RevokeDelegationPayload that can be signed |
POST | /v1/delegation/revokeDelegation | Request to revoke a delegation |
POST | /v1/handles | Request to create a new handle for an account |
POST | /v1/handles/change | Request to change a handle |
GET | /v1/handles/change/{newHandle} | Get a properly encoded ClaimHandlePayload that can be signed. |
GET | /v1/handles/{msaId} | Fetch a handle given an MSA Id |
POST | /v1/keys/add | Add new control keys for an MSA Id |
GET | /v1/keys/{msaId} | Fetch public keys given an MSA Id |
GET | /v1/keys/publicKeyAgreements/getAddKeyPayload | Get a properly encoded StatefulStorageItemizedSignaturePayloadV2 that can be signed. |
POST | /v1/keys/publicKeyAgreements | Request to add a new public Key |
GET | /healthz | Check the health status of the service |
GET | /livez | Check the live status of the service |
GET | /readyz | Check the ready status of the service |
Reference Table
Path Details
[GET]/v2/accounts/siwf
- Summary
Get the Sign In With Frequency Redirect URL
Parameters(Query)
credentials?: string[]
permissions?: string[]
callbackUrl: string
Responses
- 200 SIWF Redirect URL
application/json
{
// The base64url encoded JSON stringified signed request
signedRequest: string
// A publically available Frequency node for SIWF dApps to connect to the correct chain
frequencyRpcUrl: string
// The compiled redirect url with all the parameters already built in
redirectUrl: string
}
[POST]/v2/accounts/siwf
- Summary
Process the result of a Sign In With Frequency v2 callback
RequestBody
- application/json
{
// The code returned from the SIWF v2 Authentication service that can be exchanged for the payload. Required unless an `authorizationPayload` is provided.
authorizationCode?: string
// The SIWF v2 Authentication payload as a JSON stringified and base64url encoded value. Required unless an `authorizationCode` is provided.
authorizationPayload?: string
}
Responses
- 200 Signed in successfully
application/json
{
// The ss58 encoded MSA Control Key of the login.
controlKey: string
// The user's MSA Id, if one is already created. Will be empty if it is still being processed.
msaId?: string
// The users's validated email
email?: string
// The users's validated SMS/Phone Number
phoneNumber?: string
// The users's Private Graph encryption key.
graphKey?: #/components/schemas/GraphKeySubject
rawCredentials: {
}[]
}
[GET]/v1/accounts/siwf
- Summary
Get the Sign In With Frequency configuration
Responses
- 200 Returned SIWF Configuration data
application/json
{
providerId: string
siwfUrl: string
frequencyRpcUrl: string
}
[POST]/v1/accounts/siwf
- Summary
Request to Sign In With Frequency
RequestBody
- application/json
{
// The wallet login request information
signIn?: #/components/schemas/SignInResponseDto
signUp: {
extrinsics: {
pallet: string
extrinsicName: string
// Hex-encoded representation of the extrinsic
encodedExtrinsic: string
}[]
error: {
// Error message
message: string
}
}
}
Responses
- 201 Signed in successfully
application/json
{
referenceId: string
msaId?: string
publicKey?: string
}
[GET]/v1/accounts/{msaId}
- Summary
Fetch an account given an MSA Id
Responses
- 200 Found account
application/json
{
msaId: string
handle: {
base_handle: string
canonical_base: string
suffix: number
}
}
[GET]/v1/accounts/account/{accountId}
- Summary
Fetch an account given an Account Id
Responses
- 200 Found account
application/json
{
msaId: string
handle: {
base_handle: string
canonical_base: string
suffix: number
}
}
[GET]/v1/accounts/retireMsa/{accountId}
- Summary
Get a retireMsa unsigned, encoded extrinsic payload.
Responses
- 200 Created extrinsic
application/json
{
// Hex-encoded representation of the "RetireMsa" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
// AccountId in hex or SS58 format
accountId: string
}
[POST]/v1/accounts/retireMsa
- Summary
Request to retire an MSA ID.
RequestBody
- application/json
{
// Hex-encoded representation of the "RetireMsa" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
// AccountId in hex or SS58 format
accountId: string
// signature of the owner
signature: string
}
Responses
- 201 Created and queued request to retire an MSA ID
application/json
{
referenceId: string
}
[GET]/v2/delegations/{msaId}
- Summary
Get all delegation information associated with an MSA Id
Responses
- 200 Found delegation information
application/json
{
msaId: string
delegations: {
providerId: string
schemaDelegations: {
schemaId: number
revokedAtBlock?: number
}[]
revokedAtBlock?: number
}[]
}
[GET]/v2/delegations/{msaId}/{providerId}
- Summary
Get an MSA's delegation information for a specific provider
Responses
- 200 Found delegation information
application/json
{
msaId: string
delegations: {
providerId: string
schemaDelegations: {
schemaId: number
revokedAtBlock?: number
}[]
revokedAtBlock?: number
}[]
}
[GET]/v1/delegation/{msaId}
- Summary
Get the delegation information associated with an MSA Id
Responses
- 200 Found delegation information
application/json
{
providerId: string
schemaPermissions: {
}
revokedAt: {
}
}
[GET]/v1/delegation/revokeDelegation/{accountId}/{providerId}
- Summary
Get a properly encoded RevokeDelegationPayload that can be signed
Responses
- 200 Returned an encoded RevokeDelegationPayload for signing
application/json
{
// AccountId in hex or SS58 format
accountId: string
// MSA Id of the provider to whom the requesting user wishes to delegate
providerId: string
// Hex-encoded representation of the "revokeDelegation" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
}
[POST]/v1/delegation/revokeDelegation
- Summary
Request to revoke a delegation
RequestBody
- application/json
{
// AccountId in hex or SS58 format
accountId: string
// MSA Id of the provider to whom the requesting user wishes to delegate
providerId: string
// Hex-encoded representation of the "revokeDelegation" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
// signature of the owner
signature: string
}
Responses
- 201 Created and queued request to revoke a delegation
application/json
{
referenceId: string
}
[POST]/v1/handles
- Summary
Request to create a new handle for an account
RequestBody
- application/json
{
// AccountId in hex or SS58 format
accountId: string
payload: {
// base handle in the request
baseHandle: string
// expiration block number for this payload
expiration: number
}
// proof is the signature for the payload
proof: string
}
Responses
- 200 Handle creation request enqueued
application/json
{
referenceId: string
}
[POST]/v1/handles/change
- Summary
Request to change a handle
RequestBody
- application/json
{
// AccountId in hex or SS58 format
accountId: string
payload: {
// base handle in the request
baseHandle: string
// expiration block number for this payload
expiration: number
}
// proof is the signature for the payload
proof: string
}
Responses
- 200 Handle change request enqueued
application/json
{
referenceId: string
}
[GET]/v1/handles/change/{newHandle}
- Summary
Get a properly encoded ClaimHandlePayload that can be signed.
Responses
- 200 Returned an encoded ClaimHandlePayload for signing
application/json
{
payload: {
// base handle in the request
baseHandle: string
// expiration block number for this payload
expiration: number
}
// Raw encodedPayload is scale encoded of payload in hex format
encodedPayload: string
}
[GET]/v1/handles/{msaId}
- Summary
Fetch a handle given an MSA Id
Responses
- 200 Found a handle
application/json
{
base_handle: string
canonical_base: string
suffix: number
}
[POST]/v1/keys/add
- Summary
Add new control keys for an MSA Id
RequestBody
- application/json
{
// msaOwnerAddress representing the target of this request
msaOwnerAddress: string
// msaOwnerSignature is the signature by msa owner
msaOwnerSignature: string
// newKeyOwnerSignature is the signature with new key
newKeyOwnerSignature: string
payload: {
// MSA Id of the user requesting the new key
msaId: string
// expiration block number for this payload
expiration: number
// newPublicKey in hex format
newPublicKey: string
}
}
Responses
- 200 Found public keys
application/json
{
referenceId: string
}
[GET]/v1/keys/{msaId}
- Summary
Fetch public keys given an MSA Id
Responses
- 200 Found public keys
application/json
{
msaKeys: {
}
}
[GET]/v1/keys/publicKeyAgreements/getAddKeyPayload
- Summary
Get a properly encoded StatefulStorageItemizedSignaturePayloadV2 that can be signed.
Parameters(Query)
msaId: string
newKey: string
Responses
- 200 Returned an encoded StatefulStorageItemizedSignaturePayloadV2 for signing
application/json
{
payload: {
actions: {
// Action Item type
type: enum[ADD_ITEM, DELETE_ITEM]
// encodedPayload to be added
encodedPayload?: string
// index of the item to be deleted
index?: number
}[]
// schemaId related to the payload
schemaId: number
// targetHash related to the stateful storage
targetHash: number
// expiration block number for this payload
expiration: number
}
// Raw encodedPayload to be signed
encodedPayload: string
}
[POST]/v1/keys/publicKeyAgreements
- Summary
Request to add a new public Key
RequestBody
- application/json
{
// AccountId in hex or SS58 format
accountId: string
payload: {
actions: {
// Action Item type
type: enum[ADD_ITEM, DELETE_ITEM]
// encodedPayload to be added
encodedPayload?: string
// index of the item to be deleted
index?: number
}[]
// schemaId related to the payload
schemaId: number
// targetHash related to the stateful storage
targetHash: number
// expiration block number for this payload
expiration: number
}
// proof is the signature for the payload
proof: string
}
Responses
- 200 Add new key request enqueued
application/json
{
referenceId: string
}
[GET]/healthz
- Summary
Check the health status of the service
Responses
- 200 Service is healthy
[GET]/livez
- Summary
Check the live status of the service
Responses
- 200 Service is live
[GET]/readyz
- Summary
Check the ready status of the service
Responses
- 200 Service is ready
References
#/components/schemas/WalletV2RedirectResponseDto
{
// The base64url encoded JSON stringified signed request
signedRequest: string
// A publically available Frequency node for SIWF dApps to connect to the correct chain
frequencyRpcUrl: string
// The compiled redirect url with all the parameters already built in
redirectUrl: string
}
#/components/schemas/WalletV2LoginRequestDto
{
// The code returned from the SIWF v2 Authentication service that can be exchanged for the payload. Required unless an `authorizationPayload` is provided.
authorizationCode?: string
// The SIWF v2 Authentication payload as a JSON stringified and base64url encoded value. Required unless an `authorizationCode` is provided.
authorizationPayload?: string
}
#/components/schemas/GraphKeySubject
{
// The id type of the VerifiedGraphKeyCredential.
id: string
// The encoded public key.
encodedPublicKeyValue: string
// The encoded private key. WARNING: This is sensitive user information!
encodedPrivateKeyValue: string
// How the encoded keys are encoded. Only "base16" (aka hex) currently.
encoding: string
// Any addition formatting options. Only: "bare" currently.
format: string
// The encryption key algorithm.
type: string
// The DSNP key type.
keyType: string
}
#/components/schemas/WalletV2LoginResponseDto
{
// The ss58 encoded MSA Control Key of the login.
controlKey: string
// The user's MSA Id, if one is already created. Will be empty if it is still being processed.
msaId?: string
// The users's validated email
email?: string
// The users's validated SMS/Phone Number
phoneNumber?: string
// The users's Private Graph encryption key.
graphKey?: #/components/schemas/GraphKeySubject
rawCredentials: {
}[]
}
#/components/schemas/WalletLoginConfigResponseDto
{
providerId: string
siwfUrl: string
frequencyRpcUrl: string
}
#/components/schemas/HandleResponseDto
{
base_handle: string
canonical_base: string
suffix: number
}
#/components/schemas/AccountResponseDto
{
msaId: string
handle: {
base_handle: string
canonical_base: string
suffix: number
}
}
#/components/schemas/SiwsPayloadDto
{
message: string
// Signature of the payload
signature: string
}
#/components/schemas/ErrorResponseDto
{
// Error message
message: string
}
#/components/schemas/SignInResponseDto
{
siwsPayload: {
message: string
// Signature of the payload
signature: string
}
error: {
// Error message
message: string
}
}
#/components/schemas/EncodedExtrinsicDto
{
pallet: string
extrinsicName: string
// Hex-encoded representation of the extrinsic
encodedExtrinsic: string
}
#/components/schemas/SignUpResponseDto
{
extrinsics: {
pallet: string
extrinsicName: string
// Hex-encoded representation of the extrinsic
encodedExtrinsic: string
}[]
error: {
// Error message
message: string
}
}
#/components/schemas/WalletLoginRequestDto
{
// The wallet login request information
signIn?: #/components/schemas/SignInResponseDto
signUp: {
extrinsics: {
pallet: string
extrinsicName: string
// Hex-encoded representation of the extrinsic
encodedExtrinsic: string
}[]
error: {
// Error message
message: string
}
}
}
#/components/schemas/WalletLoginResponseDto
{
referenceId: string
msaId?: string
publicKey?: string
}
#/components/schemas/RetireMsaPayloadResponseDto
{
// Hex-encoded representation of the "RetireMsa" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
// AccountId in hex or SS58 format
accountId: string
}
#/components/schemas/RetireMsaRequestDto
{
// Hex-encoded representation of the "RetireMsa" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
// AccountId in hex or SS58 format
accountId: string
// signature of the owner
signature: string
}
#/components/schemas/TransactionResponse
{
referenceId: string
}
#/components/schemas/SchemaDelegation
{
schemaId: number
revokedAtBlock?: number
}
#/components/schemas/Delegation
{
providerId: string
schemaDelegations: {
schemaId: number
revokedAtBlock?: number
}[]
revokedAtBlock?: number
}
#/components/schemas/DelegationResponseV2
{
msaId: string
delegations: {
providerId: string
schemaDelegations: {
schemaId: number
revokedAtBlock?: number
}[]
revokedAtBlock?: number
}[]
}
#/components/schemas/u32
{
}
#/components/schemas/DelegationResponse
{
providerId: string
schemaPermissions: {
}
revokedAt: {
}
}
#/components/schemas/RevokeDelegationPayloadResponseDto
{
// AccountId in hex or SS58 format
accountId: string
// MSA Id of the provider to whom the requesting user wishes to delegate
providerId: string
// Hex-encoded representation of the "revokeDelegation" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
}
#/components/schemas/RevokeDelegationPayloadRequestDto
{
// AccountId in hex or SS58 format
accountId: string
// MSA Id of the provider to whom the requesting user wishes to delegate
providerId: string
// Hex-encoded representation of the "revokeDelegation" extrinsic
encodedExtrinsic: string
// payload to be signed
payloadToSign: string
// signature of the owner
signature: string
}
#/components/schemas/HandlePayloadDto
{
// base handle in the request
baseHandle: string
// expiration block number for this payload
expiration: number
}
#/components/schemas/HandleRequestDto
{
// AccountId in hex or SS58 format
accountId: string
payload: {
// base handle in the request
baseHandle: string
// expiration block number for this payload
expiration: number
}
// proof is the signature for the payload
proof: string
}
#/components/schemas/ChangeHandlePayloadRequest
{
payload: {
// base handle in the request
baseHandle: string
// expiration block number for this payload
expiration: number
}
// Raw encodedPayload is scale encoded of payload in hex format
encodedPayload: string
}
#/components/schemas/KeysRequestPayloadDto
{
// MSA Id of the user requesting the new key
msaId: string
// expiration block number for this payload
expiration: number
// newPublicKey in hex format
newPublicKey: string
}
#/components/schemas/KeysRequestDto
{
// msaOwnerAddress representing the target of this request
msaOwnerAddress: string
// msaOwnerSignature is the signature by msa owner
msaOwnerSignature: string
// newKeyOwnerSignature is the signature with new key
newKeyOwnerSignature: string
payload: {
// MSA Id of the user requesting the new key
msaId: string
// expiration block number for this payload
expiration: number
// newPublicKey in hex format
newPublicKey: string
}
}
#/components/schemas/KeysResponse
{
msaKeys: {
}
}
#/components/schemas/ItemActionType
{
"type": "string",
"description": "Action Item type",
"enum": [
"ADD_ITEM",
"DELETE_ITEM"
]
}
#/components/schemas/ItemActionDto
{
// Action Item type
type: enum[ADD_ITEM, DELETE_ITEM]
// encodedPayload to be added
encodedPayload?: string
// index of the item to be deleted
index?: number
}
#/components/schemas/ItemizedSignaturePayloadDto
{
actions: {
// Action Item type
type: enum[ADD_ITEM, DELETE_ITEM]
// encodedPayload to be added
encodedPayload?: string
// index of the item to be deleted
index?: number
}[]
// schemaId related to the payload
schemaId: number
// targetHash related to the stateful storage
targetHash: number
// expiration block number for this payload
expiration: number
}
#/components/schemas/AddNewPublicKeyAgreementPayloadRequest
{
payload: {
actions: {
// Action Item type
type: enum[ADD_ITEM, DELETE_ITEM]
// encodedPayload to be added
encodedPayload?: string
// index of the item to be deleted
index?: number
}[]
// schemaId related to the payload
schemaId: number
// targetHash related to the stateful storage
targetHash: number
// expiration block number for this payload
expiration: number
}
// Raw encodedPayload to be signed
encodedPayload: string
}
#/components/schemas/AddNewPublicKeyAgreementRequestDto
{
// AccountId in hex or SS58 format
accountId: string
payload: {
actions: {
// Action Item type
type: enum[ADD_ITEM, DELETE_ITEM]
// encodedPayload to be added
encodedPayload?: string
// index of the item to be deleted
index?: number
}[]
// schemaId related to the payload
schemaId: number
// targetHash related to the stateful storage
targetHash: number
// expiration block number for this payload
expiration: number
}
// proof is the signature for the payload
proof: string
}