CreateOwner

Creates an owned and API key for access to future custodial wallet interactions. Ex Could be a bank that may manage many customer custodial wallets.

rpc CreateOwner

wallet_api.v1.CreateOwner

Creates an owned and API key for access to future custodial wallet interactions. Ex Could be a bank that may manage many customer custodial wallets.

requests CreateOwnerRequest

wallet_api.v1.CreateOwnerRequest

FieldTypeDescription
owner_namestringName of the wallet owner.
resp, _ := custodialWallet.CreateOwner(ctx, &v1.CreateOwnerRequest{
  OwnerName: "OWNER_NAME",
})
fmt.Println(resp)
const createownerrequest = new CreateOwnerRequest();
createownerrequest.setOwnerName("OWNER_NAME");

service.createOwner(createownerrequest, (err, value:CreateOwnerResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using WalletApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("wallet.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure); 
      var client = new CustodialWallet.CustodialWalletClient(channel); 
      var headers = new Metadata();
      var createOwnerRequest = new CreateOwnerRequest{
        OwnerName = "OWNER_NAME",
      };
      var reply = client.CreateOwner(createOwnerRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import wallet_api.v1.Wallet.CreateOwnerRequest;
import wallet_api.v1.Wallet.CreateOwnerResponse;
import wallet_api.v1.CustodialWalletGrpc;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("wallet.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
      .usePlaintext()
      .build();
    CustodialWalletGrpc.CustodialWalletBlockingStub blockStub =
        CustodialWalletGrpc.newBlockingStub(channel);
    
    CreateOwnerRequest req_CreateOwnerRequest =
        CreateOwnerRequest.newBuilder()
          .setOwnerName("OWNER_NAME")
          .build();
    CreateOwnerResponse resp = blockStub.createOwner(req_CreateOwnerRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const createownerrequest = new CreateOwnerRequest();
createownerrequest.setOwnerName("OWNER_NAME");

service.createOwner(createownerrequest, (err, value) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;

use grpc-sdks::wallet_api::v1::wallet_service_client::CustodialWalletClient;
use grpc-sdks::wallet_api::v1::CreateOwnerRequest;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let channel = Channel::from_static("wallet.YOUR_SANDBOX_ID.knoxnetworks.io")
    .connect()
    .await?;
  let mut client = CustodialWalletClient::new(channel); 

  let request = tonic::Request::new(
    CreateOwnerRequest{
      owner_name: String::from("OWNER_NAME")
    });
// sending request and waiting for response
  let response = client.create_owner(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import wallet_api.v1.Wallet.CreateOwnerRequest
import wallet_api.v1.Wallet.CreateOwnerResponse
import wallet_api.v1.CustodialWalletGrpc

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("wallet.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
            .usePlaintext()
            .build()
    var blockStub = CustodialWalletGrpc.newBlockingStub(channel)
    
    val req_CreateOwnerRequest = CreateOwnerRequest.newBuilder()
          .setOwnerName("OWNER_NAME")
          .build()
    val resp = blockStub.createOwner(req_CreateOwnerRequest)
    println(resp)
    channel.shutdown()
}


returns CreateOwnerResponse

wallet_api.v1.CreateOwnerResponse

FieldTypeDescription
owner_idstringUUID of the created owner of the wallet(s).
api_keystringAPI key given to the wallet owner as part of creation.
owner_namestringName of the wallet owner.
{
  "owner_id": "eyJwtHeader.eyJwtPayload.Secret",
  "api_key": "API_KEY",
  "owner_name": "OWNER_NAME"
}