UNPKG

nomis-sdk

Version:

SDK for scoring the wallet on Ton

1,525 lines (1,501 loc) 103 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/config/config.ts var API_BASE_URL = "https://bg.nomis.cc/api"; var scoreName = "ton"; // src/config/scoresConfig.ts var scores = { ton: { type: "ton", name: "Ton", apiEndpoint: "ton", scoreType: 0, // chainId: 0, calculationModel: 11, abi: [], contract: "EQBykWvdmoyFD2kB4BJbdrxRqyWKzSLDn-SgwNvznRfbsaKv", // referrals: true, twitterHashtags: ["#Ton", "#Nomis"], uri: "/ton" } }; // src/contracts/getTonContract.ts var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios); var _ton = require('@ton/ton'); // src/config/ton/tact_UserScoreProxy.ts var _core = require('@ton/core'); function storeScoreData(src) { return (builder) => { const b_0 = builder; b_0.storeCoins(src.price); b_0.storeAddress(src.user); b_0.storeRef(src.content); b_0.storeUint(src.score, 32); b_0.storeAddress(src.referrer); b_0.storeCoins(src.ref_amount); }; } function storeSetScoreUser(src) { return (builder) => { const b_0 = builder; b_0.storeUint(549834415, 32); b_0.store(storeScoreData(src.score_data)); b_0.storeUint(src.item_index, 64); const b_1 = new (0, _core.Builder)(); b_1.storeCoins(src.reserve_balance); b_0.storeRef(b_1.endCell()); }; } function storeProxyDeployedRequest(src) { return (builder) => { const b_0 = builder; b_0.storeUint(1044729494, 32); b_0.storeUint(src.seqno, 32); b_0.store(storeScoreData(src.score_data)); }; } function storeQueryScoreProxy(src) { return (builder) => { const b_0 = builder; b_0.storeUint(3893761339, 32); b_0.storeUint(src.query_id, 64); b_0.storeAddress(src.destination); }; } function initUserScoreProxy_init_args(src) { return (builder) => { const b_0 = builder; b_0.storeAddress(src.parent); b_0.storeAddress(src.user); }; } async function UserScoreProxy_init(parent, user) { const __code = _core.Cell.fromBase64( "te6ccgECHgEABfoAART/APSkE/S88sgLAQIBYgIDA3rQAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zxVFds88uCCGgQFAgEgERIEiAGSMH/gcCHXScIflTAg1wsf3iCCED5FTpa6jxYw0x8BghA+RU6WuvLggdMf2zwQZ2wX4CCCECDFzq+64wKCEOgWFTu6CQYHCACuyPhDAcx/AcoAVVBQZSDXSYEBC7ry4Igg1wsKIIEE/7ry0ImDCbry4IjPFlADINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8Wyx/LPxLKAMsfye1UA7qBEU34QlLgxwXy9FNnvY6RXwdwgELIySdVIH9VMG1t2zyPOIFE9lF4uhfy9AakJ7NVMXAIgEAIyFVgghBxGjElUAjLHxbKAAYQRRA0QTDbPMkoRDN/VTBtbds84n8PDQ8CQDDTHwGCECDFzq+68uCB2zwG0z/UAdD6ADBIgGwY2zx/CQoBbI6x0x8BghDoFhU7uvLggdM/+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiBJsEuAwcA4ArvoA+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiAHU0x8g1wsBwwCOH/pAASDXSYEBC7ry4Igg1wsKIIEE/7ry0ImDCbry4IiUctchbeIB+gBVUALcO4ERTfhCUuDHBfL0KLOTOX84kTDiIvhDU9rbPFxwWchwAcsBcwHLAXABywASzMzJ+QDIcgHLAXABywASygfL/8nQINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiC1w+wI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ell.call(void 0, ); builder.storeRef(__system); builder.storeUint(0, 1); initUserScoreProxy_init_args({ $$type: "UserScoreProxy_init_args", parent, user })(builder); const __data = builder.endCell(); return { code: __code, data: __data }; } var UserScoreProxy_errors = { 2: { message: `Stack underflow` }, 3: { message: `Stack overflow` }, 4: { message: `Integer overflow` }, 5: { message: `Integer out of expected range` }, 6: { message: `Invalid opcode` }, 7: { message: `Type check error` }, 8: { message: `Cell overflow` }, 9: { message: `Cell underflow` }, 10: { message: `Dictionary error` }, 13: { message: `Out of gas error` }, 32: { message: `Method ID not found` }, 34: { message: `Action is invalid or not supported` }, 37: { message: `Not enough TON` }, 38: { message: `Not enough extra-currencies` }, 128: { message: `Null reference exception` }, 129: { message: `Invalid serialization prefix` }, 130: { message: `Invalid incoming message` }, 131: { message: `Constraints error` }, 132: { message: `Access denied` }, 133: { message: `Contract stopped` }, 134: { message: `Invalid argument` }, 135: { message: `Code of a contract was not found` }, 136: { message: `Invalid address` }, 137: { message: `Masterchain support is not enabled for this contract` }, 4429: { message: `Invalid sender` }, 5165: { message: `Not enough value` }, 17654: { message: `Invalid seqno` }, 17810: { message: `Invalid referrer addr/amount` }, 41207: { message: `invalid sender` }, 48401: { message: `Invalid signature` } }; var UserScoreProxy_types = [ { name: "StateInit", header: null, fields: [ { name: "code", type: { kind: "simple", type: "cell", optional: false } }, { name: "data", type: { kind: "simple", type: "cell", optional: false } } ] }, { name: "Context", header: null, fields: [ { name: "bounced", type: { kind: "simple", type: "bool", optional: false } }, { name: "sender", type: { kind: "simple", type: "address", optional: false } }, { name: "value", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "raw", type: { kind: "simple", type: "slice", optional: false } } ] }, { name: "SendParameters", header: null, fields: [ { name: "bounce", type: { kind: "simple", type: "bool", optional: false } }, { name: "to", type: { kind: "simple", type: "address", optional: false } }, { name: "value", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "mode", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "body", type: { kind: "simple", type: "cell", optional: true } }, { name: "code", type: { kind: "simple", type: "cell", optional: true } }, { name: "data", type: { kind: "simple", type: "cell", optional: true } } ] }, { name: "Deploy", header: 2490013878, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } } ] }, { name: "DeployOk", header: 2952335191, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } } ] }, { name: "FactoryDeploy", header: 1829761339, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "cashback", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "ChangeOwner", header: 2174598809, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "newOwner", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "ChangeOwnerOk", header: 846932810, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "newOwner", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "NftTransfer", header: 1607220500, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "new_owner", type: { kind: "simple", type: "address", optional: false } }, { name: "response_destination", type: { kind: "simple", type: "address", optional: false } }, { name: "custom_payload", type: { kind: "simple", type: "cell", optional: true } }, { name: "forward_amount", type: { kind: "simple", type: "uint", optional: false, format: "coins" } }, { name: "forward_payload", type: { kind: "simple", type: "slice", optional: false, format: "remainder" } } ] }, { name: "NftGetStaticData", header: 801842850, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } } ] }, { name: "NftReportStaticData", header: 2339837749, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "index", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "collection", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "ProveOwnership", header: 81711432, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "dest", type: { kind: "simple", type: "address", optional: false } }, { name: "forward_payload", type: { kind: "simple", type: "cell", optional: false } }, { name: "with_content", type: { kind: "simple", type: "bool", optional: false } } ] }, { name: "OwnershipProof", header: 86296494, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "item_id", type: { kind: "simple", type: "uint", optional: false, format: 256 } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } }, { name: "data", type: { kind: "simple", type: "cell", optional: false } }, { name: "revoked_at", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "content", type: { kind: "simple", type: "cell", optional: true } } ] }, { name: "RequestOwner", header: 3502489578, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "dest", type: { kind: "simple", type: "address", optional: false } }, { name: "forward_payload", type: { kind: "simple", type: "cell", optional: false } }, { name: "with_content", type: { kind: "simple", type: "bool", optional: false } } ] }, { name: "OwnerInfo", header: 232130531, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "item_id", type: { kind: "simple", type: "uint", optional: false, format: 256 } }, { name: "initiator", type: { kind: "simple", type: "address", optional: false } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } }, { name: "data", type: { kind: "simple", type: "cell", optional: false } }, { name: "revoked_at", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "content", type: { kind: "simple", type: "cell", optional: true } } ] }, { name: "SetValidator", header: 632774787, fields: [ { name: "pub_key", type: { kind: "simple", type: "uint", optional: false, format: 256 } } ] }, { name: "SetData", header: 2189193868, fields: [ { name: "content", type: { kind: "simple", type: "cell", optional: true } }, { name: "set_score_exec_fee", type: { kind: "simple", type: "uint", optional: true, format: "coins" } }, { name: "item_reserve_balance", type: { kind: "simple", type: "uint", optional: true, format: "coins" } }, { name: "collection_reserve_balance", type: { kind: "simple", type: "uint", optional: true, format: "coins" } } ] }, { name: "Signature", header: null, fields: [ { name: "seqno", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "valid_until", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "signed_bytes", type: { kind: "simple", type: "fixed-bytes", optional: false, format: 64 } } ] }, { name: "ScoreData", header: null, fields: [ { name: "price", type: { kind: "simple", type: "uint", optional: false, format: "coins" } }, { name: "user", type: { kind: "simple", type: "address", optional: false } }, { name: "content", type: { kind: "simple", type: "cell", optional: false } }, { name: "score", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "referrer", type: { kind: "simple", type: "address", optional: true } }, { name: "ref_amount", type: { kind: "simple", type: "uint", optional: false, format: "coins" } } ] }, { name: "SetScoreParent", header: 3899072791, fields: [ { name: "signature", type: { kind: "simple", type: "Signature", optional: false } }, { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } } ] }, { name: "SetScoreUser", header: 549834415, fields: [ { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } }, { name: "item_index", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "reserve_balance", type: { kind: "simple", type: "uint", optional: false, format: "coins" } } ] }, { name: "SetScoreItem", header: 2312732293, fields: [ { name: "data", type: { kind: "simple", type: "ScoreData", optional: false } }, { name: "reserve_balance", type: { kind: "simple", type: "uint", optional: false, format: "coins" } } ] }, { name: "ProxyDeployedRequest", header: 1044729494, fields: [ { name: "seqno", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } } ] }, { name: "ProxyDeployedResponse", header: 1897541925, fields: [ { name: "is_mint", type: { kind: "simple", type: "bool", optional: false } }, { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } } ] }, { name: "QueryScore", header: 1789555454, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "user", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "QueryScoreProxy", header: 3893761339, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "destination", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "QueryScoreProxyResponse", header: 3949093957, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "score", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "user", type: { kind: "simple", type: "address", optional: false } }, { name: "destination", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "QueryScoreResponse", header: 356313908, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "score", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "user", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "NftData", header: null, fields: [ { name: "deployed", type: { kind: "simple", type: "bool", optional: false } }, { name: "index", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "collection", type: { kind: "simple", type: "address", optional: false } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } }, { name: "content", type: { kind: "simple", type: "cell", optional: false } } ] }, { name: "CollectionData", header: null, fields: [ { name: "next_index", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "content", type: { kind: "simple", type: "cell", optional: false } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } } ] } ]; var UserScoreProxy_getters = [ { name: "score_item_index", arguments: [], returnType: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "seqno", arguments: [], returnType: { kind: "simple", type: "int", optional: false, format: 257 } } ]; var UserScoreProxy_receivers = [ { receiver: "internal", message: { kind: "typed", type: "ProxyDeployedRequest" } }, { receiver: "internal", message: { kind: "typed", type: "SetScoreUser" } }, { receiver: "internal", message: { kind: "typed", type: "QueryScoreProxy" } } ]; var UserScoreProxy = class _UserScoreProxy { constructor(address, init) { this.abi = { types: UserScoreProxy_types, getters: UserScoreProxy_getters, receivers: UserScoreProxy_receivers, errors: UserScoreProxy_errors }; this.address = address; this.init = init; } static async init(parent, user) { return await UserScoreProxy_init(parent, user); } static async fromInit(parent, user) { const init = await UserScoreProxy_init(parent, user); const address = _core.contractAddress.call(void 0, 0, init); return new _UserScoreProxy(address, init); } static fromAddress(address) { return new _UserScoreProxy(address); } async send(provider, via, args, message) { let body = null; if (message && typeof message === "object" && !(message instanceof _core.Slice) && message.$$type === "ProxyDeployedRequest") { body = _core.beginCell.call(void 0, ).store(storeProxyDeployedRequest(message)).endCell(); } if (message && typeof message === "object" && !(message instanceof _core.Slice) && message.$$type === "SetScoreUser") { body = _core.beginCell.call(void 0, ).store(storeSetScoreUser(message)).endCell(); } if (message && typeof message === "object" && !(message instanceof _core.Slice) && message.$$type === "QueryScoreProxy") { body = _core.beginCell.call(void 0, ).store(storeQueryScoreProxy(message)).endCell(); } if (body === null) { throw new Error("Invalid message type"); } await provider.internal(via, { ...args, body }); } async getScoreItemIndex(provider) { const builder = new (0, _core.TupleBuilder)(); const source = (await provider.get("score_item_index", builder.build())).stack; const result = source.readBigNumber(); return result; } async getSeqno(provider) { const builder = new (0, _core.TupleBuilder)(); const source = (await provider.get("seqno", builder.build())).stack; const result = source.readBigNumber(); return result; } }; // src/config/ton/tact_ScoreItem.ts function storeNftTransfer(src) { return (builder) => { const b_0 = builder; b_0.storeUint(1607220500, 32); b_0.storeUint(src.query_id, 64); b_0.storeAddress(src.new_owner); b_0.storeAddress(src.response_destination); if (src.custom_payload !== null && src.custom_payload !== void 0) { b_0.storeBit(true).storeRef(src.custom_payload); } else { b_0.storeBit(false); } b_0.storeCoins(src.forward_amount); b_0.storeBuilder(src.forward_payload.asBuilder()); }; } function storeNftGetStaticData(src) { return (builder) => { const b_0 = builder; b_0.storeUint(801842850, 32); b_0.storeUint(src.query_id, 64); }; } function storeProveOwnership(src) { return (builder) => { const b_0 = builder; b_0.storeUint(81711432, 32); b_0.storeUint(src.query_id, 64); b_0.storeAddress(src.dest); b_0.storeRef(src.forward_payload); b_0.storeBit(src.with_content); }; } function storeRequestOwner(src) { return (builder) => { const b_0 = builder; b_0.storeUint(3502489578, 32); b_0.storeUint(src.query_id, 64); b_0.storeAddress(src.dest); b_0.storeRef(src.forward_payload); b_0.storeBit(src.with_content); }; } function storeScoreData2(src) { return (builder) => { const b_0 = builder; b_0.storeCoins(src.price); b_0.storeAddress(src.user); b_0.storeRef(src.content); b_0.storeUint(src.score, 32); b_0.storeAddress(src.referrer); b_0.storeCoins(src.ref_amount); }; } function storeSetScoreItem(src) { return (builder) => { const b_0 = builder; b_0.storeUint(2312732293, 32); b_0.store(storeScoreData2(src.data)); b_0.storeCoins(src.reserve_balance); }; } function loadTupleNftData(source) { const _deployed = source.readBoolean(); const _index = source.readBigNumber(); const _collection = source.readAddress(); const _owner = source.readAddress(); const _content = source.readCell(); return { $$type: "NftData", deployed: _deployed, index: _index, collection: _collection, owner: _owner, content: _content }; } function initScoreItem_init_args(src) { return (builder) => { const b_0 = builder; b_0.storeAddress(src.collection); b_0.storeInt(src.index, 257); }; } async function ScoreItem_init(collection, index) { const __code = _core.Cell.fromBase64( "te6ccgECKQEAB1AAART/APSkE/S88sgLAQIBYgIDA5rQAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zxVF9s88uCCyPhDAcx/AcoAVXDbPMntVCQEBQIBIBUWBO4BkjB/4HAh10nCH5UwINcLH94gghCJ2X6Fuo8XMNMfAYIQidl+hbry4IHbPAb6AFB3bBfgIIIQBN7RSLqOtzDTHwGCEATe0Ui68uCB0z/6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIAdTSAFUwbBTgIAYHCAkB9lCHINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WUAUgbpUwcAHLAY4eINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8W4lADINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WAcjL/xLMEssfE8sfygDJARQArvoA+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiAHU0x8g1wsBwwCOH/pAASDXSYEBC7ry4Igg1wsKIIEE/7ry0ImDCbry4IiUctchbeIB+gBVUANmNls1NoERTfhCUpDHBfL0IrMglTM4J38D3gJw+wJwgQCCA46B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kapimgtzIbG7E5piQmrKoYrDGws7g8prGcmLszu5i0upu4M7mioZuaG7sjQQLCnO2E=" ); const builder = _core.beginCell.call(void 0, ); builder.storeRef(__system); builder.storeUint(0, 1); initScoreItem_init_args({ $$type: "ScoreItem_init_args", collection, index })( builder ); const __data = builder.endCell(); return { code: __code, data: __data }; } var ScoreItem_errors = { 2: { message: `Stack underflow` }, 3: { message: `Stack overflow` }, 4: { message: `Integer overflow` }, 5: { message: `Integer out of expected range` }, 6: { message: `Invalid opcode` }, 7: { message: `Type check error` }, 8: { message: `Cell overflow` }, 9: { message: `Cell underflow` }, 10: { message: `Dictionary error` }, 13: { message: `Out of gas error` }, 32: { message: `Method ID not found` }, 34: { message: `Action is invalid or not supported` }, 37: { message: `Not enough TON` }, 38: { message: `Not enough extra-currencies` }, 128: { message: `Null reference exception` }, 129: { message: `Invalid serialization prefix` }, 130: { message: `Invalid incoming message` }, 131: { message: `Constraints error` }, 132: { message: `Access denied` }, 133: { message: `Contract stopped` }, 134: { message: `Invalid argument` }, 135: { message: `Code of a contract was not found` }, 136: { message: `Invalid address` }, 137: { message: `Masterchain support is not enabled for this contract` }, 4429: { message: `Invalid sender` }, 5165: { message: `Not enough value` }, 17654: { message: `Invalid seqno` }, 17810: { message: `Invalid referrer addr/amount` }, 41207: { message: `invalid sender` }, 48401: { message: `Invalid signature` } }; var ScoreItem_types = [ { name: "StateInit", header: null, fields: [ { name: "code", type: { kind: "simple", type: "cell", optional: false } }, { name: "data", type: { kind: "simple", type: "cell", optional: false } } ] }, { name: "Context", header: null, fields: [ { name: "bounced", type: { kind: "simple", type: "bool", optional: false } }, { name: "sender", type: { kind: "simple", type: "address", optional: false } }, { name: "value", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "raw", type: { kind: "simple", type: "slice", optional: false } } ] }, { name: "SendParameters", header: null, fields: [ { name: "bounce", type: { kind: "simple", type: "bool", optional: false } }, { name: "to", type: { kind: "simple", type: "address", optional: false } }, { name: "value", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "mode", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "body", type: { kind: "simple", type: "cell", optional: true } }, { name: "code", type: { kind: "simple", type: "cell", optional: true } }, { name: "data", type: { kind: "simple", type: "cell", optional: true } } ] }, { name: "Deploy", header: 2490013878, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } } ] }, { name: "DeployOk", header: 2952335191, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } } ] }, { name: "FactoryDeploy", header: 1829761339, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "cashback", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "ChangeOwner", header: 2174598809, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "newOwner", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "ChangeOwnerOk", header: 846932810, fields: [ { name: "queryId", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "newOwner", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "NftTransfer", header: 1607220500, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "new_owner", type: { kind: "simple", type: "address", optional: false } }, { name: "response_destination", type: { kind: "simple", type: "address", optional: false } }, { name: "custom_payload", type: { kind: "simple", type: "cell", optional: true } }, { name: "forward_amount", type: { kind: "simple", type: "uint", optional: false, format: "coins" } }, { name: "forward_payload", type: { kind: "simple", type: "slice", optional: false, format: "remainder" } } ] }, { name: "NftGetStaticData", header: 801842850, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } } ] }, { name: "NftReportStaticData", header: 2339837749, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "index", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "collection", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "ProveOwnership", header: 81711432, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "dest", type: { kind: "simple", type: "address", optional: false } }, { name: "forward_payload", type: { kind: "simple", type: "cell", optional: false } }, { name: "with_content", type: { kind: "simple", type: "bool", optional: false } } ] }, { name: "OwnershipProof", header: 86296494, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "item_id", type: { kind: "simple", type: "uint", optional: false, format: 256 } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } }, { name: "data", type: { kind: "simple", type: "cell", optional: false } }, { name: "revoked_at", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "content", type: { kind: "simple", type: "cell", optional: true } } ] }, { name: "RequestOwner", header: 3502489578, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "dest", type: { kind: "simple", type: "address", optional: false } }, { name: "forward_payload", type: { kind: "simple", type: "cell", optional: false } }, { name: "with_content", type: { kind: "simple", type: "bool", optional: false } } ] }, { name: "OwnerInfo", header: 232130531, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "item_id", type: { kind: "simple", type: "uint", optional: false, format: 256 } }, { name: "initiator", type: { kind: "simple", type: "address", optional: false } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } }, { name: "data", type: { kind: "simple", type: "cell", optional: false } }, { name: "revoked_at", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "content", type: { kind: "simple", type: "cell", optional: true } } ] }, { name: "SetValidator", header: 632774787, fields: [ { name: "pub_key", type: { kind: "simple", type: "uint", optional: false, format: 256 } } ] }, { name: "SetData", header: 2189193868, fields: [ { name: "content", type: { kind: "simple", type: "cell", optional: true } }, { name: "set_score_exec_fee", type: { kind: "simple", type: "uint", optional: true, format: "coins" } }, { name: "item_reserve_balance", type: { kind: "simple", type: "uint", optional: true, format: "coins" } }, { name: "collection_reserve_balance", type: { kind: "simple", type: "uint", optional: true, format: "coins" } } ] }, { name: "Signature", header: null, fields: [ { name: "seqno", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "valid_until", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "signed_bytes", type: { kind: "simple", type: "fixed-bytes", optional: false, format: 64 } } ] }, { name: "ScoreData", header: null, fields: [ { name: "price", type: { kind: "simple", type: "uint", optional: false, format: "coins" } }, { name: "user", type: { kind: "simple", type: "address", optional: false } }, { name: "content", type: { kind: "simple", type: "cell", optional: false } }, { name: "score", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "referrer", type: { kind: "simple", type: "address", optional: true } }, { name: "ref_amount", type: { kind: "simple", type: "uint", optional: false, format: "coins" } } ] }, { name: "SetScoreParent", header: 3899072791, fields: [ { name: "signature", type: { kind: "simple", type: "Signature", optional: false } }, { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } } ] }, { name: "SetScoreUser", header: 549834415, fields: [ { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } }, { name: "item_index", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "reserve_balance", type: { kind: "simple", type: "uint", optional: false, format: "coins" } } ] }, { name: "SetScoreItem", header: 2312732293, fields: [ { name: "data", type: { kind: "simple", type: "ScoreData", optional: false } }, { name: "reserve_balance", type: { kind: "simple", type: "uint", optional: false, format: "coins" } } ] }, { name: "ProxyDeployedRequest", header: 1044729494, fields: [ { name: "seqno", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } } ] }, { name: "ProxyDeployedResponse", header: 1897541925, fields: [ { name: "is_mint", type: { kind: "simple", type: "bool", optional: false } }, { name: "score_data", type: { kind: "simple", type: "ScoreData", optional: false } } ] }, { name: "QueryScore", header: 1789555454, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "user", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "QueryScoreProxy", header: 3893761339, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "destination", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "QueryScoreProxyResponse", header: 3949093957, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "score", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "user", type: { kind: "simple", type: "address", optional: false } }, { name: "destination", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "QueryScoreResponse", header: 356313908, fields: [ { name: "query_id", type: { kind: "simple", type: "uint", optional: false, format: 64 } }, { name: "score", type: { kind: "simple", type: "uint", optional: false, format: 32 } }, { name: "user", type: { kind: "simple", type: "address", optional: false } } ] }, { name: "NftData", header: null, fields: [ { name: "deployed", type: { kind: "simple", type: "bool", optional: false } }, { name: "index", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "collection", type: { kind: "simple", type: "address", optional: false } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } }, { name: "content", type: { kind: "simple", type: "cell", optional: false } } ] }, { name: "CollectionData", header: null, fields: [ { name: "next_index", type: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "content", type: { kind: "simple", type: "cell", optional: false } }, { name: "owner", type: { kind: "simple", type: "address", optional: false } } ] } ]; var ScoreItem_getters = [ { name: "get_authority_address", arguments: [], returnType: { kind: "simple", type: "slice", optional: false } }, { name: "get_revoked_time", arguments: [], returnType: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "score", arguments: [], returnType: { kind: "simple", type: "int", optional: false, format: 257 } }, { name: "get_nft_data", arguments: [], returnType: { kind: "simple", type: "NftData", optional: false } } ]; var ScoreItem_receivers = [ { receiver: "internal", message: { kind: "t