@xcapit/shelter-sdk
Version:
SDK for Shelter smart contracts on Stellar
57 lines (56 loc) • 1.35 kB
JavaScript
import { Client, Keypair } from "shelter-sdk";
export class FakeClient {
_options;
_steward;
options = {
contractId: "aContractId",
};
constructor(_options, _steward = Keypair.random()) {
this._options = _options;
this._steward = _steward;
}
static deploy() {
return {
built: { sign: () => { } },
};
}
async aid_of({ recipient, token, }) {
return Promise.resolve({
result: {
amount: 1,
expiration: 1749653376464,
},
});
}
async steward() {
return Promise.resolve({
result: this._steward.publicKey(),
});
}
async unbound_aid(options) {
return this._fakeAssembledTx();
}
async bound_aid(options) {
return this._fakeAssembledTx();
}
async update_steward(options) {
return this._fakeAssembledTx();
}
async update_release_key(options) {
return this._fakeAssembledTx();
}
async guard(options) {
return this._fakeAssembledTx();
}
async open(options) {
return this._fakeAssembledTx();
}
async seal(options) {
return this._fakeAssembledTx();
}
_fakeAssembledTx() {
return {
built: { sign: () => { } },
};
}
}