Narval | Docs
GithubHome
  • Narval Connect
    • Overview
    • Getting Started
  • Security Overview
  • Providers
    • Providers
      • Anchorage
      • BitGo
      • Fireblocks
  • Guide
    • ConnectClient
    • Connect Widget
      • initiateConnect
      • completeConnect
    • Using a Connection
      • listWallets
      • getWalletById
      • listAccounts
      • getAccountById
      • listAddresses
      • getAddressById
      • listKnownDestinations
      • sendTransfer
      • getTransfer
      • EVM Transactions
        • sendTransaction
        • getTransactionById
        • signMessage
        • getSignMessageById
        • signTypedData
        • getTypedDataById
      • Staking
        • Ethereum (ETH)
        • Polygon (POL)
        • Solana (SOL)
        • Sui (SUI)
      • Raw Signing
        • signRaw
        • getRawSignRequest
    • Manage Connections
      • listConnections
      • getConnection
      • revokeConnection
  • API Reference
    • REST API
      • Authorization
      • Connect Widget
      • Networks & Assets
      • Wallets, Accounts, Addresses
      • Known Destinations
      • Transfer
      • Stake
        • Ethereum
        • Polygon
        • Solana
        • Sui
      • Transactions
        • Ethereum (EVM)
      • Raw Signing
      • Transit Encryption Key
      • Manage Connections
Powered by GitBook
On this page
  1. API Reference
  2. REST API

Connect Widget

PreviousAuthorizationNextNetworks & Assets

Last updated 1 month ago

  • POSTCreate grant request
  • POSTContinue grant request

Create grant request

post

Creates a new GNAP grant request.

Header parameters
x-client-idstringRequired
detached-jwsstringRequired

Detached JSON Web Signature (JWS) token for request authentication and verification

Body
clientstringRequired

The client ID of the client requesting the access token.

Responses
201
Returns the created grant request details.
application/json
400
Bad request
post
POST /v1/grant HTTP/1.1
Host: auth.armory.playnarval.com
x-client-id: text
detached-jws: text
Content-Type: application/json
Accept: */*
Content-Length: 248

{
  "access_token": {
    "label": "text",
    "access": [
      {
        "type": "text",
        "actions": [
          "text"
        ],
        "locations": [
          "text"
        ]
      }
    ]
  },
  "client": "text",
  "user": {
    "id": "text"
  },
  "interact": {
    "start": [
      "text"
    ],
    "finish": {
      "method": "text",
      "uri": "text",
      "nonce": "text"
    }
  },
  "providers": [
    "anchorage"
  ]
}
{
  "interact": {
    "redirect": "text",
    "finish": "text",
    "expires_in": 1
  },
  "continue": {
    "access_token": {
      "value": "text"
    },
    "uri": "text"
  }
}

Continue grant request

post

Continues an existing GNAP authorization process.

Header parameters
x-client-idstringRequired
authorizationstringRequired
detached-jwsstringRequired

Detached JSON Web Signature (JWS) token for request authentication and verification

Body
interact_refstringRequired

The interact_ref of the grant request

Responses
201
Returns the continued grant request details.
application/json
400
Bad request
post
POST /v1/continue HTTP/1.1
Host: auth.armory.playnarval.com
x-client-id: text
authorization: text
detached-jws: text
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "interact_ref": "text"
}
{
  "access_token": {
    "label": "text",
    "value": "text",
    "manage": {
      "uri": "text",
      "access_token": {
        "value": "text"
      }
    },
    "access": [
      {
        "type": "text",
        "actions": [
          "text"
        ],
        "locations": [
          "text"
        ],
        "identifier": "text"
      }
    ],
    "expires_in": 1
  }
}