UNPKG

@xcapit/shelter-sdk

Version:

SDK for Shelter smart contracts on Stellar

22 lines (21 loc) 531 B
import { Client as SAC } from "sac-sdk"; import { FakeSAC } from "../fake-sac/fake-sac"; export class Transfer { _from; _to; _amount; _token; constructor(_from, _to, _amount, _token) { this._from = _from; this._to = _to; this._amount = _amount; this._token = _token; } async value(withPass) { return await withPass.applyTo(await this._token.transfer({ from: this._from, to: this._to, amount: this._amount, })); } }