Code Monkey home page Code Monkey logo

waas-client-library-go's Introduction

WaaS Go Client Library

This repository contains the Protocol Buffer definitions for the Coinbase Wallet-as-a-Service (WaaS) APIs, as well as the Go client libraries generated from them.

Overview

WaaS is Coinbase's suite of cloud APIs for creating, managing, and using Multi-Party Computation (MPC)-based crypto wallets. Designed for use by nimble start-ups and large enterprise clients alike, WaaS APIs are self-service and composable, allowing developers to easily create applications that interact with the blockchain and inherit the maximal security properties of MPC-based key management.

Documentation

For full documentation, refer to docs.cloud.coinbase.com/waas.

For APIs that require multi-party computation (MPC), refer to the WaaS SDK repository.

Prerequisites

Repository Structure

  • auth/ contains the authentication-related code for accessing WaaS APIs.
  • clients/ contains client instantiation helpers for WaaS APIs.
  • gen/ contains Go code generated from the Protocol Buffers.
  • protos/ contains the Protocol Buffers that define the WaaS APIs.

Module Installation

go get github.com/coinbase/waas-client-library-go

Get Started

To test that your API Key gives you access as expected to the WaaS APIs:

  1. Replace apiKeyName and privKeyTemplate in example.go with your API Key information.
  2. Run go build.
  3. Run ./waas-client-library-go.
  4. You should see output like the following:
2023/03/17 12:37:35 creating pool...
2023/03/17 12:37:35 created pool: name:"pools/e08c1784-f2be-4b77-8307-a9ea2d8d0017"  display_name:"My First Pool"
2023/03/17 12:37:35 listing networks...
2023/03/17 12:37:35 got network: name:"networks/ethereum-goerli"  display_name:"Goerli Ethereum Testnet"  native_asset:"networks/ethereum-goerli/assets/0c3569d3-b253-5128-a229-543e1e819430"  protocol_family:"protocolFamilies/evm"  type:TESTNET
2023/03/17 12:37:35 listing first 5 assets on Ethereum Goerli...
2023/03/17 12:37:35 got asset: name:"networks/ethereum-goerli/assets/0c3569d3-b253-5128-a229-543e1e819430"  advertised_symbol:"ETH"  decimals:18  definition:{asset_type:"native"}
2023/03/17 12:37:35 got asset: name:"networks/ethereum-goerli/assets/adbf9e76-de39-51a0-9e53-5f8ef31b7925"  advertised_symbol:"POLY"  decimals:18  definition:{asset_type:"erc20"  asset_group_id:"0x887CFe31C888EE0780795b7feFF46CE7f9AB556C"}
2023/03/17 12:37:35 got asset: name:"networks/ethereum-goerli/assets/a055a425-fe93-51ae-9099-cf5495db6e79"  advertised_symbol:"SIM"  decimals:18  definition:{asset_type:"erc20"  asset_group_id:"0x0E89BF4135acE3d4d67BF828707746D3855f3a25"}
2023/03/17 12:37:35 got asset: name:"networks/ethereum-goerli/assets/145f3157-a45d-5a77-92be-6b2af8b7af12"  advertised_symbol:"TERC20"  decimals:18  definition:{asset_type:"erc20"  asset_group_id:"0xea100Bec80418680e55D28b655da6CbEF427275f"}
2023/03/17 12:37:35 got asset: name:"networks/ethereum-goerli/assets/20b2830e-53c1-5540-9d1b-0061df3555f6"  advertised_symbol:"BETH"  decimals:18  definition:{asset_type:"erc20"  asset_group_id:"0xED6CCd7e5131073aE67221B1cA195db0fFacc940"}

waas-client-library-go's People

Contributors

john-peterson-coinbase avatar yuga-cb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waas-client-library-go's Issues

{ "name": "organizations/988f5457-fa58-4505-9a76-52c587604c2c/apiKeys/c9959bde-3f19-43f2-9e8b-44066fe0e7a7", "principal": "7c381479-fa3d-5d32-84af-c269fe2d06ea", "principalType": "USER", "publicKey": "-----BEGIN EC PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX/AEPZZBO8pYbAAA5JkMrSU83mPj\n0sASP/RINLCLKpHS4yUPeV/6au3XBonDTfxKwkjG82XhMMalAnf4CrL/yw==\n-----END EC PUBLIC KEY-----\n", "privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIK3AykxstfxRtkbTlVe/m2Mdz07+XA85K43zC5ISh6OQoAoGCCqGSM49\nAwEHoUQDQgAEX/AEPZZBO8pYbAAA5JkMrSU83mPj0sASP/RINLCLKpHS4yUPeV/6\nau3XBonDTfxKwkjG82XhMMalAnf4CrL/yw==\n-----END EC PRIVATE KEY-----\n", "createTime": "2023-09-28T10:05:03.833838932Z", "projectId": "3a0403b1-3fd7-46fd-b1de-a5928511324f", "nickname": "api-key-20230928100503", "scopes": [] }

> API key

API key

{
"name": "organizations/d3f266dc-0d36-4cd0-91c3-e3a292b0b4b3/apiKeys/032c4fdf-d763-4b0c-9ed3-ff41a873bcc8",
"principal": "5d5c9f00-3224-52a7-a1f7-9e6ce3ada40c",
"principalType": "USER",
"publicKey": "-----BEGIN EC PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAjw43hwOqS2PF4gAFbhoxIJqCHAP\niqLdg5GFVn9QAS/0oY4/fJGrCn9rpQGOvHxHf1mtQ6j4bIWN1AtHvA/3uw==\n-----END EC PUBLIC KEY-----\n",
"privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFkA1kU4DlNu36wTTHycWy6n1rsUH0UT8mfAKNtOukXHoAoGCCqGSM49\nAwEHoUQDQgAEAjw43hwOqS2PF4gAFbhoxIJqCHAPiqLdg5GFVn9QAS/0oY4/fJGr\nCn9rpQGOvHxHf1mtQ6j4bIWN1AtHvA/3uw==\n-----END EC PRIVATE KEY-----\n",
"createTime": "2023-08-05T06:34:40.265235553Z",
"projectId": "64b3f391-c69d-4c59-91a2-75816c1a0738"
}

Originally posted by @schatzy145 in #32 (comment)

Originally posted by @MartynaCzubek90 in coinbase/cbpay-js#180 (comment)

{ "name": "organizations/14d1742b-3575-4490-b9bc-a8a9c7e4973d/apiKeys/7473d38c-80c6-4a69-a715-1ea8fd950f6f", "principal": "8feb538e-137b-5864-b12a-7c75b60fa20a", "principalType": "USER", "publicKey": "-----BEGIN EC PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzR0G+CW0uVJFrpLUELqB+DlsmGmO\nA03Az8Fpv7azpgjAy87ibgQTThaQy1C1BccbCDkPoEs6mOnDkOebkybAKQ==\n-----END EC PUBLIC KEY-----\n", "privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIBddyynZ9Ya7op1B9nu1Dxyc1T6xLy72t45J2Smv9oXNoAoGCCqGSM49\nAwEHoUQDQgAEzR0G+CW0uVJFrpLUELqB+DlsmGmOA03Az8Fpv7azpgjAy87ibgQT\nThaQy1C1BccbCDkPoEs6mOnDkOebkybAKQ==\n-----END EC PRIVATE KEY-----\n", "createTime": "2023-08-19T12:29:08.938421763Z", "projectId": "5970e137-9c3d-4adc-b65d-58d33af2432d" }

UniTRU

My first project TODO NFT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.