Nukem's Possible Manifestation

    @owneraio/finp2p-sdk-js
    TypeScript icon, indicating that this package has built-in type declarations

    0.11.8 • Public • Published

    Ownera API service

    The purpose of this sdk is to provide an interface to the Ownera APIs.
    It covers the following:

    It exposes types for Typescript.

    To build the lib/ and use the package, just run yarn build.

    Detailed documentation available here

    Setup

    You need to create a .env file in your project with the following keys

    NODE_MSPID=<organization_id, e.g: bank-us>
    OWNERA_API_ADDRESS=<API url, e.g: network-bank-us.api.local.ownera.io>
    

    Usage

    Core

    import { Sdk } from '@owneraio/finp2p-sdk-js';
    
    const sdk = new Sdk({
      orgId: 'myOrdId',
      owneraAPIAddress: 'https://my-ownera-node.io',
      owneraRASAddress: 'https://my-ownera-reg-app-store.io',
      authConfig: { 
        apiKey: '<my-api-key>',
        secret: { 
          type: 1|2, 
          raw: '<my-stringified-private-key>',
        },
      },
      custodyAdapterBaseURL: '<optional-custody-url>',
    });
    
    const asset = await sdk.createAsset({
      name: `my-asset-name`,
      type: 'Company',
      issuerId: 'asset-issuer-finp2p-id',
      verifiers: [],
      denomination: { type: 'fiat', code: 'USD' },
    });

    Inner functions

    import { Asset, AssetConfig, OwneraAPI } from '@owneraio/finp2p-sdk-js';
    
    export default async () => {
      const config: AssetConfig = {
        recipientRules: [],
        recipientClaimProviders: [],
      };
    
      // Create Asset
      const result = await OwneraAPI.profiles.createAsset({ config });
      // Get Assets
      const assets: Asset[] = await OwneraAPI.oss.getAssets({});
      console.info(assets);
    };

    Keywords

    none

    Install

    npm i @owneraio/finp2p-sdk-js

    Homepage

    ownera.io/

    DownloadsWeekly Downloads

    191

    Version

    0.11.8

    License

    SEE LICENSE IN LICENSE.md

    Unpacked Size

    225 kB

    Total Files

    220

    Last publish

    Collaborators

    • owneraadmin