/blockchain

Gets contracts.

get

Gets a pagination of SmartContracts.

Authorizations
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
apiundefined · enumOptionalPossible values:
networkanyOptional
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/smart_contract HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Patches a Smart Contract

post

Patches a Smart Contract entry, associated with the specified deployed script hash.

Authorizations
Body

Creates a smart contract.

nameanyRequired

The unique symbolic name of the smart contract.

Pattern: ^\S+$
displayNameanyRequired

The name given to this contract for display purposes.

addressesanyRequired

The address of the contract from the blockchain. Depending on the network or protocol this may have several meanings and vary depending on the specific API or network.

vaultIdanyRequired

The Elements database id of the wallet containing the default account to be used for contract related requests.

metadataanyOptional

Any metadata for this contract.

Responses
400Error
application/json
post
POST /api/rest/blockchain/omni/smart_contract HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 80

{
  "name": null,
  "displayName": null,
  "addresses": null,
  "vaultId": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Gets a specific Smart Contract

get

Gets a specific Smart Contract by contractId.

Authorizations
Path parameters
contractIdanyRequired
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/smart_contract/{contractId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Patches a Smart Contract

put

Patches a Smart Contract entry, associated with the specified deployed script hash.

Authorizations
Path parameters
contractIdanyRequired
Body

Updates a smart contract.

nameanyRequired

The unique symbolic name of the smart contract.

Pattern: ^\S+$
displayNameanyRequired

The name given to this contract for display purposes.

addressesanyRequired

The address of the contract from the blockchain. Depending on the network or protocol this may have several meanings and vary depending on the specific API or network.

vaultIdanyRequired

The Elements database id of the wallet containing the default account to be used for contract related requests.

metadataanyOptional

Any metadata for this contract.

Responses
400Error
application/json
put
PUT /api/rest/blockchain/omni/smart_contract/{contractId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 80

{
  "name": null,
  "displayName": null,
  "addresses": null,
  "vaultId": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Deletes a Smart Contract

delete

Deletes a Smart Contract with the specified contractId.

Authorizations
Path parameters
contractIdanyRequired
Responses
400Error
application/json
delete
DELETE /api/rest/blockchain/omni/smart_contract/{contractId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets vaults. Optionally filtered for a specific user

get

Gets a pagination of Wallets. Optionally a user Id can be specified to filter for a given user.

Authorizations
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
userIdanyOptional
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/vault HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Creates a new Vault

post

Creates a new Vault, associated with the given user.

Authorizations
Body
userIdanyRequired

The elements-defined user ID to own the vault.

displayNameanyRequired

A user-defined name for the vault. This is used simply for the user's reference and has no bearing onthe vault's functionality.

passphraseanyOptional

The passphrase used to to encrypt the vault. If empty, then the vault will not be encrypted. Some configurations may opt to disallow encryption entirely.

algorithmundefined · enumOptional

The encryption algorithm used to secure the vault. Once crated, a vault will contains a private/public key pair which will be used to encrypt the wallets within the vault.

Possible values:
Responses
400Error
application/json
post
POST /api/rest/blockchain/omni/vault HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "userId": null,
  "displayName": null,
  "passphrase": null,
  "algorithm": "RSA_256"
}
{
  "code": "text",
  "message": "text"
}

Gets a specific Vault

get

Gets a specific Vault by Id.

Authorizations
Path parameters
vaultIdanyRequired
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/vault/{vaultId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Updates a Vault

put

Updates a Vault with the specified name or id.

Authorizations
Path parameters
vaultIdanyRequired
Body
displayNameanyRequired

A user-defined name for the vault. This is used simply for the user's reference and has no bearing onthe vault's functionality.

userIdanyRequired

The elements-defined user ID to own the vault.

passphraseanyOptional

The current passphrase for the vault. If left null, no updates to the passphrase will be made. If not-null, then the new password must also not be null.

newPassphraseanyOptional

The updated passphrase for the vault. If left null, no updates to the passphrase will be made. If not-null, then the password must also not be null.

Responses
400Error
application/json
put
PUT /api/rest/blockchain/omni/vault/{vaultId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 73

{
  "displayName": null,
  "userId": null,
  "passphrase": null,
  "newPassphrase": null
}
{
  "code": "text",
  "message": "text"
}

Deletes a Vault

delete

Deletes a Vault with the specified id.

Authorizations
Path parameters
vaultIdanyRequired
Responses
400Error
application/json
delete
DELETE /api/rest/blockchain/omni/vault/{vaultId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets wallets. Optionally filtered for a specific user

get

Gets a pagination of Wallets. Optionally a user Id can be specified to filter for a given user.

Authorizations
Path parameters
vaultIdanyRequired
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
userIdanyOptional
apiundefined · enumOptionalPossible values:
networkanyOptional
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/vault/{vaultId}/wallet HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Creates a new Wallet

post

Creates a new Wallet, associated with the given user.

Authorizations
Path parameters
vaultIdanyRequired
Body

Creates a new custodial wallet.

displayNameanyRequired

A user-defined name for the wallet. This is used simply for the user's reference and has no bearing onthe wallet's functionality.

apiundefined · enumRequired

The protocol of this wallet. Once set, this cannot be unset.

Possible values:
networksanyRequired

The networks associated with this wallet. All must support the Wallet's protocol.

preferredAccountanyOptional

The default identity. Must not be larger than the count of identities.

accountsanyRequired

Specifies a Custodial Wallet Account Creating a Wallet

Responses
400Error
application/json
post
POST /api/rest/blockchain/omni/vault/{vaultId}/wallet HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 134

{
  "displayName": null,
  "api": "NEO",
  "networks": [],
  "preferredAccount": null,
  "accounts": [
    {
      "generate": null,
      "address": null,
      "privateKey": null
    }
  ]
}
{
  "code": "text",
  "message": "text"
}

Gets a specific Wallet

get

Gets a specific Wallet by Id.

Authorizations
Path parameters
vaultIdanyRequired
walletIdanyRequired
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/vault/{vaultId}/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Updates a Wallet

put

Updates a Wallet with the specified name or id.

Authorizations
Path parameters
vaultIdanyRequired
walletIdanyRequired
Body

Updates a Wallet.

displayNameanyOptional

The new display name of the wallet.

preferredAccountany · min: 1Optional

The default identity. Must not be larger than the count of identities.

networksanyRequired

The networks associated with this wallet. All must support the Wallet's protocol.

Responses
400Error
application/json
put
PUT /api/rest/blockchain/omni/vault/{vaultId}/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "displayName": null,
  "preferredAccount": null,
  "networks": []
}
{
  "code": "text",
  "message": "text"
}

Deletes a Wallet

delete

Deletes a Wallet with the specified id.

Authorizations
Path parameters
vaultIdanyRequired
walletIdanyRequired
Responses
400Error
application/json
delete
DELETE /api/rest/blockchain/omni/vault/{vaultId}/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets a specific Wallet

get

Gets a specific Wallet by Id.

Authorizations
Path parameters
walletIdanyRequired
Responses
400Error
application/json
get
GET /api/rest/blockchain/omni/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Last updated