@xcapit/shelter-sdk
Version:
SDK for Shelter smart contracts on Stellar
26 lines (25 loc) • 1.21 kB
TypeScript
import { Client, Keypair } from "shelter-sdk";
import type { Client as SAC } from "sac-sdk";
import type { FakeClient } from "../fake-client/fake-client";
import { Transaction } from "../transaction/transaction";
import type { Rpc } from "../rpc/rpc";
import { Gate } from "../gate/gate";
import type { FakeSAC } from "../fake-sac/fake-sac";
import type { Pass } from "../pass/pass.interface";
export declare class Shelter {
private readonly _steward;
private readonly _rpc;
private readonly _client;
constructor(_steward: Keypair, _rpc: Rpc, _client: Client | FakeClient);
static connected(aSteward: Keypair, aRpc: Rpc, aShelterId: string): Promise<Shelter>;
stewardId(): Promise<string>;
boundAid(recipient: Buffer, token: string, amount: bigint, expiration: bigint): Promise<void>;
unboundAid(recipient: Buffer, token: string): Promise<void>;
id(): string;
aidOf(recipient: Buffer, token: string): Promise<bigint>;
updateReleaseKey(releaseKey: Buffer): Promise<void>;
updateSteward(newSteward: Keypair): Promise<void>;
gate(): Gate;
withdraw(sac: SAC | FakeSAC, pass: Pass): Promise<void>;
_txOf(aRawTx: any, errorMsg: string): Transaction;
}