UNPKG

freelii-passkey-kit

Version:

A helper library for creating and using smart wallet accounts on the Stellar blockchain.

29 lines (23 loc) 741 B
import { Client as SacClient } from 'sac-sdk' import { PasskeyBase } from "./base" import type { Server } from '@stellar/stellar-sdk/minimal/rpc' export class SACClient extends PasskeyBase { declare rpc: Server declare rpcUrl: string public networkPassphrase: string constructor(options: { networkPassphrase: string, rpcUrl: string }) { const { networkPassphrase, rpcUrl } = options super(rpcUrl) this.networkPassphrase = networkPassphrase } public getSACClient(SACContractId: string) { return new SacClient({ contractId: SACContractId, networkPassphrase: this.networkPassphrase, rpcUrl: this.rpcUrl, }) } }