@tonkite/highload-wallet-v3
Version:
The wrapper for highload-wallet-v3.
30 lines • 976 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InternalMessage = void 0;
const core_1 = require("@ton/core");
class InternalMessage {
queryId;
actions;
/**
* @dev internal_transfer#ae42e5a4 n:# query_id:uint64 actions:^OutList n = InternalMsgBody n
*/
static TAG = 0xae42e5a4;
constructor(queryId, actions) {
this.queryId = queryId;
this.actions = actions;
if (actions.length > 254) {
throw new Error('The maximum allowed action count is 254.');
}
}
writeTo(builder) {
builder
.storeUint(InternalMessage.TAG, 32)
.storeUint(this.queryId, 64)
.storeRef((0, core_1.beginCell)().store((0, core_1.storeOutList)(this.actions)).endCell());
}
toCell() {
return (0, core_1.beginCell)().store(this).endCell();
}
}
exports.InternalMessage = InternalMessage;
//# sourceMappingURL=internal-message.js.map