Socket
Socket
Sign inDemoInstall

@snowflake-so/safe-apps-sdk

Package Overview
Dependencies
6
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @snowflake-so/safe-apps-sdk

Snowflake Safe Apps SDK - Integrate with Snowflake Safe operating system


Version published
Weekly downloads
1.6K
increased by5.26%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Safe Apps SDK

npm

SDK for apps to integrate with Snowflake Safe via post messaging. Please find compatible supported libraries in the list below.

Installation

npm install @snowflake-so/safe-apps-sdk

yarn add @snowflake-so/safe-apps-sdl

Build

yarn install
yarn build

npm install
npm build

Services

Initialize the SDK

const sdk = new SafeAppsSDK({
  debugMode: boolean,
});

Safe Communicator Service

Get safe info
await sdk.safe.getSafeInfo();
Get safe balance
await sdk.safe.getSafeBalance();

Transaction Communicator Service;

Create a proposal
await sdk.txs.createProposal(
 display: {
   proposalName: string;
 } & NotNestedObject;
 executeInstructions: TransactionInstruction[];
 setupInstructions?: Optional<TransactionInstruction[]>;
 signers: Signer[];
)
Sign message
 public signMessage(
    payload: MessagePayload[MessageMethod.signMessage]
  ): Promise<ResponseMessage<MessageReturnData[MessageMethod.signMessage]>> {
    return this._communicator.send<MessageMethod.signMessage>(
      MessageMethod.signMessage,
      payload
    );
  }
Send transaction
  public sendTransaction(
    payload: MessagePayload[MessageMethod.sendTransaction]
  ): Promise<
    ResponseMessage<MessageReturnData[MessageMethod.sendTransaction]>
  > {
    return this._communicator.send<MessageMethod.sendTransaction>(
      MessageMethod.sendTransaction,
      payload
    );
  }

Journey of a message

Support

Struggle with the SDK integration?

If you have any problem with using the SDK in your system, drop a question our Snowflake Discord #sdk to receive a support from our engineers.

Find a bug or want to contribute to Snowflake?

If you find a bug or have any problem and idea while using the SDK, you can create an issue on SDK Github.

License MIT

Keywords

FAQs

Last updated on 13 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc