Creating a Key

Create a new symmetric key or asymmetric keypair.

Importing key material is not currently supported.

Symmetric Keys

AES-256-GCM

curl -i -XPOST \
    -H 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
    -H 'Content-Type: application/json' \
    https://vault.provide.services/api/v1/vaults/a7dd081d-8ad8-499e-a472-587f044c0039/keys \
    -d '{
      "type": "symmetric",
      "usage": "encrypt/decrypt",
      "spec": "AES-256-GCM",
      "name": "encryption key #1",
      "description": "AES encryption key"
    }'
HTTP/2 201

Response JSON:

{
  "id":"9975e23f-b445-4349-a09f-dbbb4e8850c2",
  "created_at":"2020-09-10T17:23:56.451944042+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"symmetric",
  "usage":"encrypt/decrypt",
  "spec":"AES-256-GCM",
  "name":"encryption key #1",
  "description":"AES encryption key"
}

ChaCha20

curl -i -XPOST \
    -H 'authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk5ODM1ODEzLCJpYXQiOjE1OTk3NDk0MTMsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjUzMDFhZjAwLTEyNjMtNGMxNC04Mjc0LTI2NWYzOT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json' \
    https://vault.provide.services/api/v1/vaults/730afe0f-a62d-48e0-9d67-1e07c118fbf8/keys \
    -d '{
      "type": "symmetric",
      "usage": "encrypt/decrypt",
      "spec": "ChaCha20",
      "name": "encryption key #2",
      "description": "chacha20 encryption key"
    }'

Response JSON:

{
  "id":"7516c402-5de0-4c24-8eba-2749430ac632",
  "created_at":"2020-09-10T17:28:21.63868916+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"symmetric",
  "usage":"encrypt/decrypt",
  "spec":"ChaCha20",
  "name":"encryption key #2",
  "description":"chacha20 encryption key"
}

Asymmetric Keys

Baby Jubjub

curl -i -XPOST \
    -H 'authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk5ODM1ODEzLCJpYXQiOjE1OTk3NDk0MTMsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjUzMDFhZjAwLTEyNjMtNGMxNC04Mjc0LTI2NWYzOTNlZDJiNSIsIm5hdHMiOnsicGVybWlzc2lvbnMiOnsic3Vic2NyaWJlIjp7ImFsbG93IjpbInVzZXIuNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIiwibmV0d29yay4qLmNvbm5lY3Rvci4qIiwibmV0d29yay4qLnN0YXR1cyIsInBsYXRmb3JtLlx1MDAzZSJdfX19LCJwcnZkIjp7InBlcm1pc3Npb25zIjo3NTUzLCJ1c2VyX2lkIjoiNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0sInN1YiI6InVzZXI6NGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0.fJL7wi5IfZdIZBoTXX0hFDBJuMtfU2Ub03oc0x7lD75MY9JSJ4DRdLCjiBK0DdYAv2D-V3erq9BtuooTkhUEsTAqciBhoxBygFAwvhnlxbdG_L_Fl9IyLQDow7LV7WY5odS4p1h8OAH_mpwfABDsc50uRLeJKtsWsOWzgahciIZgXGJrx-ogX-vEOrLHonytVcNZmWIeRDswO_SoZyc9Msx_Ywt6bMxVSC1ZS8t-5Spq-_xZqbGTDiM6MS0fAEsUidPZRPuZiXn473jj_dqkPbXt8pYHt4H9tdsMRGrFZbMRVxB-ebXeRhgIuTXrxrAmq6oLpw_WZ7pTrODVCeLqkRflkFculO3U1f8izsizXIX41goejOHECuE-VNXKGTr-dtOaDIlXzeejzuO-k4OjP7S2UFl98sNtj_eRjKLh4QTjd4HrPIpwjPUubA-tog76g1edeCHFkKUQzg3HGu1Lh-11tUXJeabdliRCeTrHTCAToAGUrLnihuTZRk7c9-ONeAbeKGALsciZIKMgDM-_wCQLdLbjokw_FlGiWhedp9xqFJJDpkenxElPfOesnmFaHqzAa_eFQuiC7wgdaeb06LdFOV3YmfQkmCHLdxGkRmz1mvjQZnmyoqwmKOBc8vVF9LScH6IsHn0gHn7vWUPnf2HGj3KUWevuoFmi7_2VlsA' \
    -H 'Content-Type: application/json' \
    https://vault.provide.services/api/v1/vaults/730afe0f-a62d-48e0-9d67-1e07c118fbf8/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "babyJubJub",
      "name": "babyjubjub key #1",
      "description": "babyjubjub key"
    }'

Response JSON:

{
  "id":"3f005518-d74c-4154-8346-6c51195bbef3",
  "created_at":"2020-09-10T17:32:09.486958937+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"asymmetric",
  "usage":"sign/verify",
  "spec":"babyJubJub",
  "name":"babyjubjub key #1",
  "description":"babyjubjub key",
  "public_key":"0x231d87f42ed7ce96297bee6183c9b5bfd759c86badcc7b62444d8d0359f1ce87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rODVCeLqkRflkFculO3U1f8izsizXIX41goejOHECuE-VNXKGTr-dtOaDIlXzeejzuO-k4OjP7S2UFl98sNtj_eRjKLh4QTjd4HrPIpwjPUubA-tog76g1edeCHFkKUQzg3HGu1Lh-11tUXJeabdliRCeTrHTCAToAGUrLnihuTZRk7c9-ONeAbeKGALsciZIKMgDM-_wCQLdLbjokw_FlGiWhedp9xqFJJDpkenxElPfOesnmFaHqzAa_eFQuiC7wgdaeb06LdFOV3YmfQkmCHLdxGkRmz1mvjQZnmyoqwmKOBc8vVF9LScH6IsHn0gHn7vWUPnf2HGj3KUWevuoFmi7_2VlsA' \
    -H 'Content-Type: application/json' \
    https://vault.provide.services/api/v1/vaults/730afe0f-a62d-48e0-9d67-1e07c118fbf8/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "C25519",
      "name": "c25519 key #1",
      "description": "c25519 key"
    }'

Response JSON:

{
  "id":"91ef6ce7-529a-4e39-9f91-36302e081da1",
  "created_at":"2020-09-10T17:34:12.287569686+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"asymmetric",
  "usage":"sign/verify",
  "spec":"C25519",
  "name":"c25519 key #1",
  "description":"c25519 key",
  "public_key":"0xdfd719d00fdcb495da7a7b6c01f9513d96690e2b43385d2866c8cf59d94bf320"
}

Ed25519

curl -i -XPOST \
    -H 'authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk5ODM1ODEzLCJpYXQiOjE1OTk3NDk0MTMsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjUzMDFhZjAwLTEyNjMtNGMxNC04Mjc0LTI2NWYzO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/json' \
    https://vault.provide.services/api/v1/vaults/730afe0f-a62d-48e0-9d67-1e07c118fbf8/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "Ed25519",
      "name": "Ed25519 key #1",
      "description": "ekho signing key"
    }'

Response JSON:

{
  "id":"80bdefb9-18a3-48a6-a484-f0cc09482972",
  "created_at":"2020-09-10T17:37:04.270477606+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"asymmetric",
  "usage":"sign/verify",
  "spec":"Ed25519",
  "name":"Ed25519 key #1",
  "description":"ekho signing key",
  "public_key":"0x534256355553375546504f46475645413357574f5a52494b52435a4a5351564237433549554352465834374356574a52584b473658484245"
}

Ed25519 NKey

curl -i -XPOST \
    -H 'authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk5ODM1ODEzLCJpYXQiOjE1OTk3NDk0MTMsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjUzMDFhZjAwLTEyNjMtNGMxNC04Mjc0LTI2NWYzOTNlZDJiNSIsIm5hdHMiOnsicGVybWlzc2lvbnMiOnsic3Vic2NyaWJlIjp7ImFsbG93IjpbInVzZXIuNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIiwibmV0d29yay4qLmNvbm5lY3Rvci4qIiwibmV0d29yay4qLnN0YXR1cyIsInBsYXRmb3JtLlx1MDAzZSJdfX19LCJwcnZkIjp7InBlcm1pc3Npb25zIjo3NTUzLCJ1c2VyX2lkIjoiNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0sInN1YiI6InVzZXI6NGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0.fJL7wi5IfZdIZBoTXX0hFDBJuMtfU2Ub03oc0x7lD75MY9JSJ4DRdLCjiBK0DdYAv2D-V3erq9BtuooTkhUEsTAqciBhoxBygFAwvhnlxbdG_L_Fl9IyLQDow7LV7WY5odS4p1h8OAH_mpwfABDsc50uRLeJKtsWsOWzgahciIZgXGJrx-ogX-vEOrLHonytVcNZmWIeRDswO_SoZyc9Msx_Ywt6bMxVSC1ZS8t-5Spq-_xZqbGTDiM6MS0fAEsUidPZRPuZiXn473jj_dqkPbXt8pYHt4H9tdsMRGrFZbMRVxB-ebXeRhgIuTXrxrAmq6oLpw_WZ7pTrODVCeLqkRflkFculO3U1f8izsizXIX41goejOHECuE-VNXKGTr-dtOaDIlXzeejzuO-k4OjP7S2UFl98sNtj_eRjKLh4QTjd4HrPIpwjPUubA-tog76g1edeCHFkKUQzg3HGu1Lh-11tUXJeabdliRCeTrHTCAToAGUrLnihuTZRk7c9-ONeAbeKGALsciZIKMgDM-_wCQLdLbjokw_FlGiWhedp9xqFJJDpkenxElPfOesnmFaHqzAa_eFQuiC7wgdaeb06LdFOV3YmfQkmCHLdxGkRmz1mvjQZnmyoqwmKOBc8vVF9LScH6IsHn0gHn7vWUPnf2HGj3KUWevuoFmi7_2VlsA' \
    -H 'Content-Type: application/json' \
    https://vault.provide.services/api/v1/vaults/730afe0f-a62d-48e0-9d67-1e07c118fbf8/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "Ed25519-nkey",
      "name": "Ed25519 NKey #1",
      "description": "NATS/NGS ecosystem key"
    }'

Response JSON:

{
  "id":"80bdefb9-18a3-48a6-a484-f0cc09482972",
  "created_at":"2021-11-09T12:03:04.140634133+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"asymmetric",
  "usage":"sign/verify",
  "spec":"Ed25519-nkey",
  "name":"Ed25519 NKey #1",
  "description":"NATS/NGS ecosystem key",
  "public_key":"0x534435584858594737374d3450584e504f45474e42435a484b425553524351485a51484d33513545553759504a4d54425445474a4e593348"
}

RSA

Key Length (bits)

Spec

2048

RSA-2048

3072

RSA-3072

4096

RSA-4096

    curl -i -XPOST \
    -H 'authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk5ODM1ODEzLCJpYXQiOjE1OTk3NDk0MTMsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjUzMDFhZjAwLTEyNjMtNGMxNC04Mjc0LTI2NWYzOTNlZDJiNSIsIm5hdHMiOnsicGVybWlzc2lvbnMiOnsic3Vic2NyaWJlIjp7ImFsbG93IjpbInVzZXIuNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIiwibmV0d29yay4qLmNvbm5lY3Rvci4qIiwibmV0d29yay4qLnN0YXR1cyIsInBsYXRmb3JtLlx1MDAzZSJdfX19LCJwcnZkIjp7InBlcm1pc3Npb25zIjo3NTUzLCJ1c2VyX2lkIjoiNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0sInN1YiI6InVzZXI6NGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0.fJL7wi5IfZdIZBoTXX0hFDBJuMtfU2Ub03oc0x7lD75MY9JSJ4DRdLCjiBK0DdYAv2D-V3erq9BtuooTkhUEsTAqciBhoxBygFAwvhnlxbdG_L_Fl9IyLQDow7LV7WY5odS4p1h8OAH_mpwfABDsc50uRLeJKtsWsOWzgahciIZgXGJrx-ogX-vEOrLHonytVcNZmWIeRDswO_SoZyc9Msx_Ywt6bMxVSC1ZS8t-5Spq-_xZqbGTDiM6MS0fAEsUidPZRPuZiXn473jj_dqkPbXt8pYHt4H9tdsMRGrFZbMRVxB-ebXeRhgIuTXrxrAmq6oLpw_WZ7pTrODVCeLqkRflkFculO3U1f8izsizXIX41goejOHECuE-VNXKGTr-dtOaDIlXzeejzuO-k4OjP7S2UFl98sNtj_eRjKLh4QTjd4HrPIpwjPUubA-tog76g1edeCHFkKUQzg3HGu1Lh-11tUXJeabdliRCeTrHTCAToAGUrLnihuTZRk7c9-ONeAbeKGALsciZIKMgDM-_wCQLdLbjokw_FlGiWhedp9xqFJJDpkenxElPfOesnmFaHqzAa_eFQuiC7wgdaeb06LdFOV3YmfQkmCHLdxGkRmz1mvjQZnmyoqwmKOBc8vVF9LScH6IsHn0gHn7vWUPnf2HGj3KUWevuoFmi7_2VlsA' \
    -H 'Content-Type: application/json' \
    https://vault.provide.services/api/v1/vaults/730afe0f-a62d-48e0-9d67-1e07c118fbf8/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "RSA-2048",
      "name": "rsa key #1",
      "description": "JWT Signing Key #1"
    }'

Response JSON:

{
  "id":"e9c51e8a-2464-4749-b2a0-0b29a6d572c3",
  "created_at":"2020-09-10T17:44:32.394427399+01:00",
  "vault_id":"730afe0f-a62d-48e0-9d67-1e07c118fbf8",
  "type":"asymmetric",
  "usage":"sign/verify",
  "spec":"RSA-2048",
  "name":"rsa key #1",
  "description":"JWT Signing Key #1",
  "public_key":"0x7b224e223a32353534363534303733303330333431303338373834393236303235363135353936393833343337383339343238363534333137333434343333313133353538373433393633303635363636363931303839323331383434343433383937393538323131373833373135373331343538353234373434373930363532333437333633333534383531313436353830333233383230363935383437343939383136303230373439323530313134313434353935353536303136393232393736333038353434333038393830323736393138353933373236323035383735393935303931393137373130393634353433373535393632373039393138343236383537353937363735313337353030363837373739333030393137353334383839373132373435353438383831323735363333333735353437373136363435333136363233393037323432373632363732343333363533313932393030343133353033323430313134363033383930313635303234363334313831303738343138383730343739393636363033323334313736373931333434303731323136383839313935343936373233303931393438323130323139373934393332323930373938343532303734353130333032393932343931303737343232323138383339333133323433303933393036383535333130313132373538373438343539373937383535363633393732313438363134353831353237333531353130333737363030363639363131343930313838353133333538323731313739383434353032303236313334313439303538303533393036313031333737393630353137393536393236343130383134372c2245223a36353533377d"
}

secp256k1

curl -i -XPOST \
    -H 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
    -H 'Content-Type: application/json' \
    https://vault.provide.services/api/v1/vaults/a7dd081d-8ad8-499e-a472-587f044c0039/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "secp256k1",
      "name": "org mainnet wallet address",
      "description": "organization eth/stablecoin wallet"
    }'
HTTP/2 201

Response JSON:

{
  "id": "32f4628e-a464-4dda-a01b-78235d1b68eb",
  "created_at": "2020-04-22T05:58:48.336197+00:00",
  "vault_id": "a8bc01e2-08ae-415c-8c6d-f6f873a6a947",
  "type": "asymmetric",
  "usage": "sign/verify",
  "spec": "secp256k1",
  "name": "org mainnet wallet address",
  "description": "organization eth/stablecoin wallet",
  "public_key": "0x04624897f81851dcabba67c430d19657e843620e0e6fd2e9e52251f6a3d549d6488c37b1df727ecd8abe83d5b04344563a7c98192bdf79c77f0b37ab5b6e67e7df",
  "address": "0x9cf135972E70D20410F3B01273D07106EC308cFb"
}

Note the public Ethereum address representation of the secp256k1 key is enriched and returned in the response.

Hierarchical Deterministic (HD)

BIP39 keys are deterministic wallets capable of deriving up to 4,294,967,295 secp256k1 keys per account which can be used to sign transactions, store value and build robust "account/balance" applications (i.e., Ethereum) and UXTO-based applications (i.e., Bitcoin). Technical details related to how HD wallet derivation paths work in the context of our APIs can be found here.

Create a top-level mnemonic seed using the key creation API:

curl -i -XPOST \
    -H 'content-type: application/json' \
    -H 'authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk5OTI1NDI4LCJpYXQiOjE1OTk4MzkwMjgsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjJmZjE2YzczLTczOWItNDFmZi04MTM1LTM1NTQxOWY2M2RiMCIsIm5hdHMiOnsicGVybWlzc2lvbnMiOnsic3Vic2NyaWJlIjp7ImFsbG93IjpbInVzZXIuNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIiwibmV0d29yay4qLmNvbm5lY3Rvci4qIiwibmV0d29yay4qLnN0YXR1cyIsInBsYXRmb3JtLlx1MDAzZSJdfX19LCJwcnZkIjp7InBlcm1pc3Npb25zIjo3NTUzLCJ1c2VyX2lkIjoiNGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0sInN1YiI6InVzZXI6NGM1ZDI5NjktYTQwYy00ZjZkLWFhMDItMjEzNTVmM2M5MDkxIn0.YlS8eQA1b9GjWhHjef08m0UQFg6nyQgvw34fPCEglfp48wWlLAwnLOmVZT0O3nHAf5f9XJljjLchGkS_vBqzs6xy39Paq81ywxJLU5PdNJFY13bhVjwTJCGWzL2pE8T5by2zaDHEjrsYfCr32ZY0o94pTzQEJ7f0TvjnyuE3l3B584u50d5gss_MOpf44-kOcX6T0KQwJmKA1rCWNrMQ4Hh3i1B-LoysGcOJhDJpuHCD6loijNIxvkjndQ2PeQXHqZ4ZKr0p4pIsexYflLdT1Szl59lpFipgCTomPVYAmBZX0MfZPlt30Pp62ANDs4qttH7-OrnK4m2_p6yeYGiRsf7TUj9NAYdHVetEYeu8oSgpQfmr0Z3jTxXFEY9t1cBPMB5zyBwzCMsTVjlG3xhGxr9SQ26uheMy7M-u9_8Kq-riZv2W79ALm22MSyYi7y0UeC3wG-hO8jrxns3kzV4heI3upwhXS2ccEZrpWbJe4S17egjpEDYAI3JIuWkggEzr_snB8xCV1-ZB2_r6aqdfmsj3QIZQK4U2c6Wa27NBA4hzE45qp_RMyiY7PZOzv0315TYa6qrio2qyUWRr29nHPOEAufg9L-aMYVKBOieL8VIWKw3RBVSDABN1sFWbFfiX0Pd5jny7zMxjHtoae5B-jgAzijIcH7xnvzkCBIySlhI' \
    https://vault.provide.services/api/v1/vaults/e0761eac-a6ba-45bd-9a16-9eea155e7816/keys \
    -d '{
      "type": "asymmetric",
      "usage": "sign/verify",
      "spec": "BIP39",
      "name": "baseline HD wallet",
      "description": "organization Ethereum HD wallet"
    }'
HTTP/2 201

Response JSON:

{
  "id":"73d0144d-801d-49a0-86bb-5ee1fdcc9706",
  "created_at":"2020-09-11T18:36:46.799675485+01:00",
  "vault_id":"e0761eac-a6ba-45bd-9a16-9eea155e7816",
  "type":"asymmetric",
  "usage":"sign/verify",
  "spec":"BIP39",
  "name":"baseline HD wallet",
  "description":"organization Ethereum HD wallet"
}

After creating a mnemonic as shown above, the Signing and Verification API can be used to access the various levels of the HD wallet hierarchy.

Last updated