@taquito/contracts-library 17.0.0 → 17.1.0-beta-RC.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/lib/version.js.map +1 -1
- package/dist/taquito-contracts-library.es6.js +6 -1
- package/dist/taquito-contracts-library.es6.js.map +1 -1
- package/dist/taquito-contracts-library.umd.js +6 -1
- package/dist/taquito-contracts-library.umd.js.map +1 -1
- package/dist/types/errors.d.ts +3 -3
- package/package.json +6 -6
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,wCAAyD;AAEzD;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,+BAAwB;IACpE,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,wCAAyD;AAEzD;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,+BAAwB;IACpE,YACkB,OAAe,EACf,MAAyB,EACzB,OAAe;QAE/B,KAAK,EAAE,CAAC;QAJQ,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAmB;QACzB,YAAO,GAAP,OAAO,CAAQ;QAG/B,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AATD,4DASC"}
|
package/dist/lib/version.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "17.0.
|
|
6
|
+
"commitHash": "35185f70bf071114f22f169d2e1f7f8747ced2d0",
|
|
7
|
+
"version": "17.1.0-beta-RC.1"
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
package/dist/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AACA,2EAA2E;AAC9D,QAAA,OAAO,GAAG;IACnB,YAAY,EAAE,0CAA0C;IACxD,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AACA,2EAA2E;AAC9D,QAAA,OAAO,GAAG;IACnB,YAAY,EAAE,0CAA0C;IACxD,SAAS,EAAE,kBAAkB;CAChC,CAAC"}
|
|
@@ -38,7 +38,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
38
38
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
39
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
40
|
});
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
44
|
+
var e = new Error(message);
|
|
45
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
46
|
+
};
|
|
42
47
|
|
|
43
48
|
class ReadWrapperContractsLibrary {
|
|
44
49
|
constructor(readProvider, contractslibrary) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-contracts-library.es6.js","sources":["../src/errors.ts","../src/read-provider-wrapper.ts","../src/taquito-contracts-library.ts"],"sourcesContent":["import { ParameterValidationError } from '@taquito/core';\nimport { ScriptedContracts } from '@taquito/rpc';\n/**\n * @category Error\n * @description Error indicates invalid script format being useed or passed\n */\nexport class InvalidScriptFormatError extends ParameterValidationError {\n constructor(public message: string, public script: ScriptedContracts, public address: string) {\n super();\n this.name = 'InvalidScriptFormatError';\n }\n}\n","import { BigNumber } from 'bignumber.js';\nimport {\n BlockResponse,\n EntrypointsResponse,\n MichelsonV1Expression,\n SaplingDiffResponse,\n ScriptedContracts,\n} from '@taquito/rpc';\nimport { ContractsLibrary } from './taquito-contracts-library';\nimport { BigMapQuery, BlockIdentifier, SaplingStateQuery, TzReadProvider } from '@taquito/taquito';\n\nexport class ReadWrapperContractsLibrary implements TzReadProvider {\n constructor(private readProvider: TzReadProvider, private contractslibrary: ContractsLibrary) {}\n\n async getScript(address: string, block: BlockIdentifier): Promise<ScriptedContracts> {\n const contractData = this.contractslibrary.getContract(address);\n if (contractData) {\n return contractData.script;\n } else {\n return this.readProvider.getScript(address, block);\n }\n }\n\n async getEntrypoints(contract: string): Promise<EntrypointsResponse> {\n const contractData = this.contractslibrary.getContract(contract);\n if (contractData) {\n return contractData.entrypoints;\n } else {\n return this.readProvider.getEntrypoints(contract);\n }\n }\n\n getBalance(address: string, block: BlockIdentifier): Promise<BigNumber> {\n return this.readProvider.getBalance(address, block);\n }\n getDelegate(address: string, block: BlockIdentifier): Promise<string | null> {\n return this.readProvider.getDelegate(address, block);\n }\n getNextProtocol(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getNextProtocol(block);\n }\n getProtocolConstants(block: BlockIdentifier): Promise<{\n time_between_blocks?: BigNumber[] | undefined;\n minimal_block_delay?: BigNumber | undefined;\n hard_gas_limit_per_operation: BigNumber;\n hard_gas_limit_per_block: BigNumber;\n hard_storage_limit_per_operation: BigNumber;\n cost_per_byte: BigNumber;\n smart_rollup_origination_size: number;\n }> {\n return this.readProvider.getProtocolConstants(block);\n }\n getStorage(contract: string, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getStorage(contract, block);\n }\n getBlockHash(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockHash(block);\n }\n getBlockLevel(block: BlockIdentifier): Promise<number> {\n return this.readProvider.getBlockLevel(block);\n }\n getCounter(pkh: string, block: BlockIdentifier): Promise<string> {\n return this.readProvider.getCounter(pkh, block);\n }\n getBlockTimestamp(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockTimestamp(block);\n }\n getBigMapValue(bigMapQuery: BigMapQuery, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getBigMapValue(bigMapQuery, block);\n }\n getSaplingDiffById(\n saplingStateQuery: SaplingStateQuery,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffById(saplingStateQuery, block);\n }\n getSaplingDiffByContract(\n contractAddress: string,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffByContract(contractAddress, block);\n }\n getChainId(): Promise<string> {\n return this.readProvider.getChainId();\n }\n isAccountRevealed(publicKeyHash: string, block: BlockIdentifier): Promise<boolean> {\n return this.readProvider.isAccountRevealed(publicKeyHash, block);\n }\n getBlock(block: BlockIdentifier): Promise<BlockResponse> {\n return this.readProvider.getBlock(block);\n }\n getLiveBlocks(block: BlockIdentifier): Promise<string[]> {\n return this.readProvider.getLiveBlocks(block);\n }\n}\n","/**\n * @packageDocumentation\n * @module @taquito/contracts-library\n */\n\nimport { EntrypointsResponse, ScriptedContracts } from '@taquito/rpc';\nimport { Extension, Context } from '@taquito/taquito';\nimport { validateAddress, ValidationResult, invalidDetail } from '@taquito/utils';\nimport { InvalidScriptFormatError } from './errors';\nimport { ReadWrapperContractsLibrary } from './read-provider-wrapper';\nimport { InvalidAddressError } from '@taquito/core';\n\ninterface ContractsData {\n [contractAddress: string]: { script: ScriptedContracts; entrypoints: EntrypointsResponse };\n}\n\n/**\n * @description Allows to specify static data related to contracts (i.e., script and entrypoints) avoiding Taquito to fetch them from the network.\n *\n * @example\n * ```\n * import { ContractsLibrary } from '@taquito/contracts-library';\n * import { TezosToolkit } from '@taquito/taquito';\n *\n * const Tezos = new TezosToolkit('rpcUrl');\n * const contractsLibrary = new ContractsLibrary();\n *\n * contractsLibrary.addContract({\n * ['contractAddress1']: {\n * script: script1, // obtained from Tezos.rpc.getContract('contractAddress1').script\n * entrypoints: entrypoints1 // obtained from Tezos.rpc.getEntrypoints('contractAddress1')\n * },\n * // load more contracts\n * });\n *\n * Tezos.addExtension(contractsLibrary);\n * ```\n *\n */\nexport class ContractsLibrary implements Extension {\n private _contractsLibrary: ContractsData = {};\n\n /**\n * @description Saves one of several contract in the library\n *\n * @param contract is an object where the key is a contract address and the value is an object having a script and an entrypoints properties.\n * Note: the expected format for the script and entrypoints properties are the same as the one respectivlely returned by\n * `TezosToolkit.rpc.getContract('contractAddress').script` and `TezosToolkit.rpc.getEntrypoints`\n * @throws {@link InvalidAddressError} If the contract address is not valid\n * @throws {@link InvalidScriptFormatError} If the script is not in the expected format\n */\n addContract(contract: ContractsData) {\n for (const contractAddress in contract) {\n this.validateContractAddress(contractAddress);\n this.validateContractScriptFormat(contract[contractAddress].script, contractAddress);\n Object.assign(this._contractsLibrary, {\n [contractAddress]: { ...contract[contractAddress] },\n });\n }\n }\n\n getContract(contractAddress: string) {\n return this._contractsLibrary[contractAddress];\n }\n\n configureContext(context: Context) {\n context.registerProviderDecorator((context: Context) => {\n context.readProvider = new ReadWrapperContractsLibrary(context.readProvider, this);\n return context;\n });\n }\n\n private validateContractAddress(address: string) {\n const addressValidation = validateAddress(address);\n if (addressValidation !== ValidationResult.VALID) {\n throw new InvalidAddressError(address, invalidDetail(addressValidation));\n }\n }\n\n private validateContractScriptFormat(script: ScriptedContracts, address: string) {\n if (!script.code) {\n throw new InvalidScriptFormatError(\n `Invalid script format of ${address} missing property \"code\". Valid script can be retrieved from \"TezosToolkit.rpc.getNormalizedScript(${address})\".`,\n script,\n address\n );\n }\n }\n}\n"],"names":[],"mappings":";;;AAEA;;;AAGG;AACG,MAAO,wBAAyB,SAAQ,wBAAwB,CAAA;AACpE,IAAA,WAAA,CAAmB,OAAe,EAAS,MAAyB,EAAS,OAAe,EAAA;AAC1F,QAAA,KAAK,EAAE,CAAC;QADS,IAAO,CAAA,OAAA,GAA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AC/B,QAAA,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAgB,KAAI;AACrD,YAAA,OAAO,CAAC,YAAY,GAAG,IAAI,2BAA2B,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AACnF,YAAA,OAAO,OAAO,CAAC;AACjB,SAAC,CAAC,CAAC;KACJ;AAEO,IAAA,uBAAuB,CAAC,OAAe,EAAA;AAC7C,QAAA,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AACnD,QAAA,IAAI,iBAAiB,KAAK,gBAAgB,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC1E,SAAA;KACF;IAEO,4BAA4B,CAAC,MAAyB,EAAE,OAAe,EAAA;AAC7E,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AAChB,YAAA,MAAM,IAAI,wBAAwB,CAChC,CAAA,yBAAA,EAA4B,OAAO,CAAA,mGAAA,EAAsG,OAAO,CAAA,GAAA,CAAK,EACrJ,MAAM,EACN,OAAO,CACR,CAAC;AACH,SAAA;KACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"taquito-contracts-library.es6.js","sources":["../src/errors.ts","../src/read-provider-wrapper.ts","../src/taquito-contracts-library.ts"],"sourcesContent":["import { ParameterValidationError } from '@taquito/core';\nimport { ScriptedContracts } from '@taquito/rpc';\n/**\n * @category Error\n * @description Error indicates invalid script format being useed or passed\n */\nexport class InvalidScriptFormatError extends ParameterValidationError {\n constructor(\n public readonly message: string,\n public readonly script: ScriptedContracts,\n public readonly address: string\n ) {\n super();\n this.name = 'InvalidScriptFormatError';\n }\n}\n","import { BigNumber } from 'bignumber.js';\nimport {\n BlockResponse,\n EntrypointsResponse,\n MichelsonV1Expression,\n SaplingDiffResponse,\n ScriptedContracts,\n} from '@taquito/rpc';\nimport { ContractsLibrary } from './taquito-contracts-library';\nimport { BigMapQuery, BlockIdentifier, SaplingStateQuery, TzReadProvider } from '@taquito/taquito';\n\nexport class ReadWrapperContractsLibrary implements TzReadProvider {\n constructor(private readProvider: TzReadProvider, private contractslibrary: ContractsLibrary) {}\n\n async getScript(address: string, block: BlockIdentifier): Promise<ScriptedContracts> {\n const contractData = this.contractslibrary.getContract(address);\n if (contractData) {\n return contractData.script;\n } else {\n return this.readProvider.getScript(address, block);\n }\n }\n\n async getEntrypoints(contract: string): Promise<EntrypointsResponse> {\n const contractData = this.contractslibrary.getContract(contract);\n if (contractData) {\n return contractData.entrypoints;\n } else {\n return this.readProvider.getEntrypoints(contract);\n }\n }\n\n getBalance(address: string, block: BlockIdentifier): Promise<BigNumber> {\n return this.readProvider.getBalance(address, block);\n }\n getDelegate(address: string, block: BlockIdentifier): Promise<string | null> {\n return this.readProvider.getDelegate(address, block);\n }\n getNextProtocol(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getNextProtocol(block);\n }\n getProtocolConstants(block: BlockIdentifier): Promise<{\n time_between_blocks?: BigNumber[] | undefined;\n minimal_block_delay?: BigNumber | undefined;\n hard_gas_limit_per_operation: BigNumber;\n hard_gas_limit_per_block: BigNumber;\n hard_storage_limit_per_operation: BigNumber;\n cost_per_byte: BigNumber;\n smart_rollup_origination_size: number;\n }> {\n return this.readProvider.getProtocolConstants(block);\n }\n getStorage(contract: string, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getStorage(contract, block);\n }\n getBlockHash(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockHash(block);\n }\n getBlockLevel(block: BlockIdentifier): Promise<number> {\n return this.readProvider.getBlockLevel(block);\n }\n getCounter(pkh: string, block: BlockIdentifier): Promise<string> {\n return this.readProvider.getCounter(pkh, block);\n }\n getBlockTimestamp(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockTimestamp(block);\n }\n getBigMapValue(bigMapQuery: BigMapQuery, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getBigMapValue(bigMapQuery, block);\n }\n getSaplingDiffById(\n saplingStateQuery: SaplingStateQuery,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffById(saplingStateQuery, block);\n }\n getSaplingDiffByContract(\n contractAddress: string,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffByContract(contractAddress, block);\n }\n getChainId(): Promise<string> {\n return this.readProvider.getChainId();\n }\n isAccountRevealed(publicKeyHash: string, block: BlockIdentifier): Promise<boolean> {\n return this.readProvider.isAccountRevealed(publicKeyHash, block);\n }\n getBlock(block: BlockIdentifier): Promise<BlockResponse> {\n return this.readProvider.getBlock(block);\n }\n getLiveBlocks(block: BlockIdentifier): Promise<string[]> {\n return this.readProvider.getLiveBlocks(block);\n }\n}\n","/**\n * @packageDocumentation\n * @module @taquito/contracts-library\n */\n\nimport { EntrypointsResponse, ScriptedContracts } from '@taquito/rpc';\nimport { Extension, Context } from '@taquito/taquito';\nimport { validateAddress, ValidationResult, invalidDetail } from '@taquito/utils';\nimport { InvalidScriptFormatError } from './errors';\nimport { ReadWrapperContractsLibrary } from './read-provider-wrapper';\nimport { InvalidAddressError } from '@taquito/core';\n\ninterface ContractsData {\n [contractAddress: string]: { script: ScriptedContracts; entrypoints: EntrypointsResponse };\n}\n\n/**\n * @description Allows to specify static data related to contracts (i.e., script and entrypoints) avoiding Taquito to fetch them from the network.\n *\n * @example\n * ```\n * import { ContractsLibrary } from '@taquito/contracts-library';\n * import { TezosToolkit } from '@taquito/taquito';\n *\n * const Tezos = new TezosToolkit('rpcUrl');\n * const contractsLibrary = new ContractsLibrary();\n *\n * contractsLibrary.addContract({\n * ['contractAddress1']: {\n * script: script1, // obtained from Tezos.rpc.getContract('contractAddress1').script\n * entrypoints: entrypoints1 // obtained from Tezos.rpc.getEntrypoints('contractAddress1')\n * },\n * // load more contracts\n * });\n *\n * Tezos.addExtension(contractsLibrary);\n * ```\n *\n */\nexport class ContractsLibrary implements Extension {\n private _contractsLibrary: ContractsData = {};\n\n /**\n * @description Saves one of several contract in the library\n *\n * @param contract is an object where the key is a contract address and the value is an object having a script and an entrypoints properties.\n * Note: the expected format for the script and entrypoints properties are the same as the one respectivlely returned by\n * `TezosToolkit.rpc.getContract('contractAddress').script` and `TezosToolkit.rpc.getEntrypoints`\n * @throws {@link InvalidAddressError} If the contract address is not valid\n * @throws {@link InvalidScriptFormatError} If the script is not in the expected format\n */\n addContract(contract: ContractsData) {\n for (const contractAddress in contract) {\n this.validateContractAddress(contractAddress);\n this.validateContractScriptFormat(contract[contractAddress].script, contractAddress);\n Object.assign(this._contractsLibrary, {\n [contractAddress]: { ...contract[contractAddress] },\n });\n }\n }\n\n getContract(contractAddress: string) {\n return this._contractsLibrary[contractAddress];\n }\n\n configureContext(context: Context) {\n context.registerProviderDecorator((context: Context) => {\n context.readProvider = new ReadWrapperContractsLibrary(context.readProvider, this);\n return context;\n });\n }\n\n private validateContractAddress(address: string) {\n const addressValidation = validateAddress(address);\n if (addressValidation !== ValidationResult.VALID) {\n throw new InvalidAddressError(address, invalidDetail(addressValidation));\n }\n }\n\n private validateContractScriptFormat(script: ScriptedContracts, address: string) {\n if (!script.code) {\n throw new InvalidScriptFormatError(\n `Invalid script format of ${address} missing property \"code\". Valid script can be retrieved from \"TezosToolkit.rpc.getNormalizedScript(${address})\".`,\n script,\n address\n );\n }\n }\n}\n"],"names":[],"mappings":";;;AAEA;;;AAGG;AACG,MAAO,wBAAyB,SAAQ,wBAAwB,CAAA;AACpE,IAAA,WAAA,CACkB,OAAe,EACf,MAAyB,EACzB,OAAe,EAAA;AAE/B,QAAA,KAAK,EAAE,CAAC;QAJQ,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QACf,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;QACzB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAG/B,QAAA,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;KACxC;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C;AACnF,YAAA,OAAO,OAAO,CAAC;AACjB,SAAC,CAAC,CAAC;KACJ;AAEO,IAAA,uBAAuB,CAAC,OAAe,EAAA;AAC7C,QAAA,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AACnD,QAAA,IAAI,iBAAiB,KAAK,gBAAgB,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC1E,SAAA;KACF;IAEO,4BAA4B,CAAC,MAAyB,EAAE,OAAe,EAAA;AAC7E,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AAChB,YAAA,MAAM,IAAI,wBAAwB,CAChC,CAAA,yBAAA,EAA4B,OAAO,CAAA,mGAAA,EAAsG,OAAO,CAAA,GAAA,CAAK,EACrJ,MAAM,EACN,OAAO,CACR,CAAC;AACH,SAAA;KACF;AACF;;;;"}
|
|
@@ -41,7 +41,12 @@
|
|
|
41
41
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
47
|
+
var e = new Error(message);
|
|
48
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
49
|
+
};
|
|
45
50
|
|
|
46
51
|
class ReadWrapperContractsLibrary {
|
|
47
52
|
constructor(readProvider, contractslibrary) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-contracts-library.umd.js","sources":["../src/errors.ts","../src/read-provider-wrapper.ts","../src/taquito-contracts-library.ts"],"sourcesContent":["import { ParameterValidationError } from '@taquito/core';\nimport { ScriptedContracts } from '@taquito/rpc';\n/**\n * @category Error\n * @description Error indicates invalid script format being useed or passed\n */\nexport class InvalidScriptFormatError extends ParameterValidationError {\n constructor(public message: string, public script: ScriptedContracts, public address: string) {\n super();\n this.name = 'InvalidScriptFormatError';\n }\n}\n","import { BigNumber } from 'bignumber.js';\nimport {\n BlockResponse,\n EntrypointsResponse,\n MichelsonV1Expression,\n SaplingDiffResponse,\n ScriptedContracts,\n} from '@taquito/rpc';\nimport { ContractsLibrary } from './taquito-contracts-library';\nimport { BigMapQuery, BlockIdentifier, SaplingStateQuery, TzReadProvider } from '@taquito/taquito';\n\nexport class ReadWrapperContractsLibrary implements TzReadProvider {\n constructor(private readProvider: TzReadProvider, private contractslibrary: ContractsLibrary) {}\n\n async getScript(address: string, block: BlockIdentifier): Promise<ScriptedContracts> {\n const contractData = this.contractslibrary.getContract(address);\n if (contractData) {\n return contractData.script;\n } else {\n return this.readProvider.getScript(address, block);\n }\n }\n\n async getEntrypoints(contract: string): Promise<EntrypointsResponse> {\n const contractData = this.contractslibrary.getContract(contract);\n if (contractData) {\n return contractData.entrypoints;\n } else {\n return this.readProvider.getEntrypoints(contract);\n }\n }\n\n getBalance(address: string, block: BlockIdentifier): Promise<BigNumber> {\n return this.readProvider.getBalance(address, block);\n }\n getDelegate(address: string, block: BlockIdentifier): Promise<string | null> {\n return this.readProvider.getDelegate(address, block);\n }\n getNextProtocol(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getNextProtocol(block);\n }\n getProtocolConstants(block: BlockIdentifier): Promise<{\n time_between_blocks?: BigNumber[] | undefined;\n minimal_block_delay?: BigNumber | undefined;\n hard_gas_limit_per_operation: BigNumber;\n hard_gas_limit_per_block: BigNumber;\n hard_storage_limit_per_operation: BigNumber;\n cost_per_byte: BigNumber;\n smart_rollup_origination_size: number;\n }> {\n return this.readProvider.getProtocolConstants(block);\n }\n getStorage(contract: string, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getStorage(contract, block);\n }\n getBlockHash(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockHash(block);\n }\n getBlockLevel(block: BlockIdentifier): Promise<number> {\n return this.readProvider.getBlockLevel(block);\n }\n getCounter(pkh: string, block: BlockIdentifier): Promise<string> {\n return this.readProvider.getCounter(pkh, block);\n }\n getBlockTimestamp(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockTimestamp(block);\n }\n getBigMapValue(bigMapQuery: BigMapQuery, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getBigMapValue(bigMapQuery, block);\n }\n getSaplingDiffById(\n saplingStateQuery: SaplingStateQuery,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffById(saplingStateQuery, block);\n }\n getSaplingDiffByContract(\n contractAddress: string,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffByContract(contractAddress, block);\n }\n getChainId(): Promise<string> {\n return this.readProvider.getChainId();\n }\n isAccountRevealed(publicKeyHash: string, block: BlockIdentifier): Promise<boolean> {\n return this.readProvider.isAccountRevealed(publicKeyHash, block);\n }\n getBlock(block: BlockIdentifier): Promise<BlockResponse> {\n return this.readProvider.getBlock(block);\n }\n getLiveBlocks(block: BlockIdentifier): Promise<string[]> {\n return this.readProvider.getLiveBlocks(block);\n }\n}\n","/**\n * @packageDocumentation\n * @module @taquito/contracts-library\n */\n\nimport { EntrypointsResponse, ScriptedContracts } from '@taquito/rpc';\nimport { Extension, Context } from '@taquito/taquito';\nimport { validateAddress, ValidationResult, invalidDetail } from '@taquito/utils';\nimport { InvalidScriptFormatError } from './errors';\nimport { ReadWrapperContractsLibrary } from './read-provider-wrapper';\nimport { InvalidAddressError } from '@taquito/core';\n\ninterface ContractsData {\n [contractAddress: string]: { script: ScriptedContracts; entrypoints: EntrypointsResponse };\n}\n\n/**\n * @description Allows to specify static data related to contracts (i.e., script and entrypoints) avoiding Taquito to fetch them from the network.\n *\n * @example\n * ```\n * import { ContractsLibrary } from '@taquito/contracts-library';\n * import { TezosToolkit } from '@taquito/taquito';\n *\n * const Tezos = new TezosToolkit('rpcUrl');\n * const contractsLibrary = new ContractsLibrary();\n *\n * contractsLibrary.addContract({\n * ['contractAddress1']: {\n * script: script1, // obtained from Tezos.rpc.getContract('contractAddress1').script\n * entrypoints: entrypoints1 // obtained from Tezos.rpc.getEntrypoints('contractAddress1')\n * },\n * // load more contracts\n * });\n *\n * Tezos.addExtension(contractsLibrary);\n * ```\n *\n */\nexport class ContractsLibrary implements Extension {\n private _contractsLibrary: ContractsData = {};\n\n /**\n * @description Saves one of several contract in the library\n *\n * @param contract is an object where the key is a contract address and the value is an object having a script and an entrypoints properties.\n * Note: the expected format for the script and entrypoints properties are the same as the one respectivlely returned by\n * `TezosToolkit.rpc.getContract('contractAddress').script` and `TezosToolkit.rpc.getEntrypoints`\n * @throws {@link InvalidAddressError} If the contract address is not valid\n * @throws {@link InvalidScriptFormatError} If the script is not in the expected format\n */\n addContract(contract: ContractsData) {\n for (const contractAddress in contract) {\n this.validateContractAddress(contractAddress);\n this.validateContractScriptFormat(contract[contractAddress].script, contractAddress);\n Object.assign(this._contractsLibrary, {\n [contractAddress]: { ...contract[contractAddress] },\n });\n }\n }\n\n getContract(contractAddress: string) {\n return this._contractsLibrary[contractAddress];\n }\n\n configureContext(context: Context) {\n context.registerProviderDecorator((context: Context) => {\n context.readProvider = new ReadWrapperContractsLibrary(context.readProvider, this);\n return context;\n });\n }\n\n private validateContractAddress(address: string) {\n const addressValidation = validateAddress(address);\n if (addressValidation !== ValidationResult.VALID) {\n throw new InvalidAddressError(address, invalidDetail(addressValidation));\n }\n }\n\n private validateContractScriptFormat(script: ScriptedContracts, address: string) {\n if (!script.code) {\n throw new InvalidScriptFormatError(\n `Invalid script format of ${address} missing property \"code\". Valid script can be retrieved from \"TezosToolkit.rpc.getNormalizedScript(${address})\".`,\n script,\n address\n );\n }\n }\n}\n"],"names":["ParameterValidationError","validateAddress","ValidationResult","InvalidAddressError","invalidDetail"],"mappings":";;;;;;EAEA;;;EAGG;EACG,MAAO,w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OACF;EAED,IAAA,WAAW,CAAC,eAAuB,EAAA;EACjC,QAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;OAChD;EAED,IAAA,gBAAgB,CAAC,OAAgB,EAAA;EAC/B,QAAA,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAgB,KAAI;EACrD,YAAA,OAAO,CAAC,YAAY,GAAG,IAAI,2BAA2B,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;EACnF,YAAA,OAAO,OAAO,CAAC;EACjB,SAAC,CAAC,CAAC;OACJ;EAEO,IAAA,uBAAuB,CAAC,OAAe,EAAA;EAC7C,QAAA,MAAM,iBAAiB,GAAGC,qBAAe,CAAC,OAAO,CAAC,CAAC;EACnD,QAAA,IAAI,iBAAiB,KAAKC,sBAAgB,CAAC,KAAK,EAAE;cAChD,MAAM,IAAIC,wBAAmB,CAAC,OAAO,EAAEC,mBAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;EAC1E,SAAA;OACF;MAEO,4BAA4B,CAAC,MAAyB,EAAE,OAAe,EAAA;EAC7E,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;EAChB,YAAA,MAAM,IAAI,wBAAwB,CAChC,CAAA,yBAAA,EAA4B,OAAO,CAAA,mGAAA,EAAsG,OAAO,CAAA,GAAA,CAAK,EACrJ,MAAM,EACN,OAAO,CACR,CAAC;EACH,SAAA;OACF;EACF;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taquito-contracts-library.umd.js","sources":["../src/errors.ts","../src/read-provider-wrapper.ts","../src/taquito-contracts-library.ts"],"sourcesContent":["import { ParameterValidationError } from '@taquito/core';\nimport { ScriptedContracts } from '@taquito/rpc';\n/**\n * @category Error\n * @description Error indicates invalid script format being useed or passed\n */\nexport class InvalidScriptFormatError extends ParameterValidationError {\n constructor(\n public readonly message: string,\n public readonly script: ScriptedContracts,\n public readonly address: string\n ) {\n super();\n this.name = 'InvalidScriptFormatError';\n }\n}\n","import { BigNumber } from 'bignumber.js';\nimport {\n BlockResponse,\n EntrypointsResponse,\n MichelsonV1Expression,\n SaplingDiffResponse,\n ScriptedContracts,\n} from '@taquito/rpc';\nimport { ContractsLibrary } from './taquito-contracts-library';\nimport { BigMapQuery, BlockIdentifier, SaplingStateQuery, TzReadProvider } from '@taquito/taquito';\n\nexport class ReadWrapperContractsLibrary implements TzReadProvider {\n constructor(private readProvider: TzReadProvider, private contractslibrary: ContractsLibrary) {}\n\n async getScript(address: string, block: BlockIdentifier): Promise<ScriptedContracts> {\n const contractData = this.contractslibrary.getContract(address);\n if (contractData) {\n return contractData.script;\n } else {\n return this.readProvider.getScript(address, block);\n }\n }\n\n async getEntrypoints(contract: string): Promise<EntrypointsResponse> {\n const contractData = this.contractslibrary.getContract(contract);\n if (contractData) {\n return contractData.entrypoints;\n } else {\n return this.readProvider.getEntrypoints(contract);\n }\n }\n\n getBalance(address: string, block: BlockIdentifier): Promise<BigNumber> {\n return this.readProvider.getBalance(address, block);\n }\n getDelegate(address: string, block: BlockIdentifier): Promise<string | null> {\n return this.readProvider.getDelegate(address, block);\n }\n getNextProtocol(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getNextProtocol(block);\n }\n getProtocolConstants(block: BlockIdentifier): Promise<{\n time_between_blocks?: BigNumber[] | undefined;\n minimal_block_delay?: BigNumber | undefined;\n hard_gas_limit_per_operation: BigNumber;\n hard_gas_limit_per_block: BigNumber;\n hard_storage_limit_per_operation: BigNumber;\n cost_per_byte: BigNumber;\n smart_rollup_origination_size: number;\n }> {\n return this.readProvider.getProtocolConstants(block);\n }\n getStorage(contract: string, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getStorage(contract, block);\n }\n getBlockHash(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockHash(block);\n }\n getBlockLevel(block: BlockIdentifier): Promise<number> {\n return this.readProvider.getBlockLevel(block);\n }\n getCounter(pkh: string, block: BlockIdentifier): Promise<string> {\n return this.readProvider.getCounter(pkh, block);\n }\n getBlockTimestamp(block: BlockIdentifier): Promise<string> {\n return this.readProvider.getBlockTimestamp(block);\n }\n getBigMapValue(bigMapQuery: BigMapQuery, block: BlockIdentifier): Promise<MichelsonV1Expression> {\n return this.readProvider.getBigMapValue(bigMapQuery, block);\n }\n getSaplingDiffById(\n saplingStateQuery: SaplingStateQuery,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffById(saplingStateQuery, block);\n }\n getSaplingDiffByContract(\n contractAddress: string,\n block: BlockIdentifier\n ): Promise<SaplingDiffResponse> {\n return this.readProvider.getSaplingDiffByContract(contractAddress, block);\n }\n getChainId(): Promise<string> {\n return this.readProvider.getChainId();\n }\n isAccountRevealed(publicKeyHash: string, block: BlockIdentifier): Promise<boolean> {\n return this.readProvider.isAccountRevealed(publicKeyHash, block);\n }\n getBlock(block: BlockIdentifier): Promise<BlockResponse> {\n return this.readProvider.getBlock(block);\n }\n getLiveBlocks(block: BlockIdentifier): Promise<string[]> {\n return this.readProvider.getLiveBlocks(block);\n }\n}\n","/**\n * @packageDocumentation\n * @module @taquito/contracts-library\n */\n\nimport { EntrypointsResponse, ScriptedContracts } from '@taquito/rpc';\nimport { Extension, Context } from '@taquito/taquito';\nimport { validateAddress, ValidationResult, invalidDetail } from '@taquito/utils';\nimport { InvalidScriptFormatError } from './errors';\nimport { ReadWrapperContractsLibrary } from './read-provider-wrapper';\nimport { InvalidAddressError } from '@taquito/core';\n\ninterface ContractsData {\n [contractAddress: string]: { script: ScriptedContracts; entrypoints: EntrypointsResponse };\n}\n\n/**\n * @description Allows to specify static data related to contracts (i.e., script and entrypoints) avoiding Taquito to fetch them from the network.\n *\n * @example\n * ```\n * import { ContractsLibrary } from '@taquito/contracts-library';\n * import { TezosToolkit } from '@taquito/taquito';\n *\n * const Tezos = new TezosToolkit('rpcUrl');\n * const contractsLibrary = new ContractsLibrary();\n *\n * contractsLibrary.addContract({\n * ['contractAddress1']: {\n * script: script1, // obtained from Tezos.rpc.getContract('contractAddress1').script\n * entrypoints: entrypoints1 // obtained from Tezos.rpc.getEntrypoints('contractAddress1')\n * },\n * // load more contracts\n * });\n *\n * Tezos.addExtension(contractsLibrary);\n * ```\n *\n */\nexport class ContractsLibrary implements Extension {\n private _contractsLibrary: ContractsData = {};\n\n /**\n * @description Saves one of several contract in the library\n *\n * @param contract is an object where the key is a contract address and the value is an object having a script and an entrypoints properties.\n * Note: the expected format for the script and entrypoints properties are the same as the one respectivlely returned by\n * `TezosToolkit.rpc.getContract('contractAddress').script` and `TezosToolkit.rpc.getEntrypoints`\n * @throws {@link InvalidAddressError} If the contract address is not valid\n * @throws {@link InvalidScriptFormatError} If the script is not in the expected format\n */\n addContract(contract: ContractsData) {\n for (const contractAddress in contract) {\n this.validateContractAddress(contractAddress);\n this.validateContractScriptFormat(contract[contractAddress].script, contractAddress);\n Object.assign(this._contractsLibrary, {\n [contractAddress]: { ...contract[contractAddress] },\n });\n }\n }\n\n getContract(contractAddress: string) {\n return this._contractsLibrary[contractAddress];\n }\n\n configureContext(context: Context) {\n context.registerProviderDecorator((context: Context) => {\n context.readProvider = new ReadWrapperContractsLibrary(context.readProvider, this);\n return context;\n });\n }\n\n private validateContractAddress(address: string) {\n const addressValidation = validateAddress(address);\n if (addressValidation !== ValidationResult.VALID) {\n throw new InvalidAddressError(address, invalidDetail(addressValidation));\n }\n }\n\n private validateContractScriptFormat(script: ScriptedContracts, address: string) {\n if (!script.code) {\n throw new InvalidScriptFormatError(\n `Invalid script format of ${address} missing property \"code\". Valid script can be retrieved from \"TezosToolkit.rpc.getNormalizedScript(${address})\".`,\n script,\n address\n );\n }\n }\n}\n"],"names":["ParameterValidationError","validateAddress","ValidationResult","InvalidAddressError","invalidDetail"],"mappings":";;;;;;EAEA;;;EAGG;EACG,MAAO,wBAAyB,SAAQA,6BAAwB,CAAA;EACpE,IAAA,WAAA,CACkB,OAAe,EACf,MAAyB,EACzB,OAAe,EAAA;EAE/B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,CAAC,CAAC;OAChD;EAED,IAAA,gBAAgB,CAAC,OAAgB,EAAA;EAC/B,QAAA,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAgB,KAAI;EACrD,YAAA,OAAO,CAAC,YAAY,GAAG,IAAI,2BAA2B,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;EACnF,YAAA,OAAO,OAAO,CAAC;EACjB,SAAC,CAAC,CAAC;OACJ;EAEO,IAAA,uBAAuB,CAAC,OAAe,EAAA;EAC7C,QAAA,MAAM,iBAAiB,GAAGC,qBAAe,CAAC,OAAO,CAAC,CAAC;EACnD,QAAA,IAAI,iBAAiB,KAAKC,sBAAgB,CAAC,KAAK,EAAE;cAChD,MAAM,IAAIC,wBAAmB,CAAC,OAAO,EAAEC,mBAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;EAC1E,SAAA;OACF;MAEO,4BAA4B,CAAC,MAAyB,EAAE,OAAe,EAAA;EAC7E,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;EAChB,YAAA,MAAM,IAAI,wBAAwB,CAChC,CAAA,yBAAA,EAA4B,OAAO,CAAA,mGAAA,EAAsG,OAAO,CAAA,GAAA,CAAK,EACrJ,MAAM,EACN,OAAO,CACR,CAAC;EACH,SAAA;OACF;EACF;;;;;;;;;;"}
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { ScriptedContracts } from '@taquito/rpc';
|
|
|
5
5
|
* @description Error indicates invalid script format being useed or passed
|
|
6
6
|
*/
|
|
7
7
|
export declare class InvalidScriptFormatError extends ParameterValidationError {
|
|
8
|
-
message: string;
|
|
9
|
-
script: ScriptedContracts;
|
|
10
|
-
address: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly script: ScriptedContracts;
|
|
10
|
+
readonly address: string;
|
|
11
11
|
constructor(message: string, script: ScriptedContracts, address: string);
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/contracts-library",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.1.0-beta-RC.1",
|
|
4
4
|
"description": "Can be used as an extension on the TezosToolkit to provide contracts data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos"
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@taquito/core": "^17.0.
|
|
72
|
-
"@taquito/rpc": "^17.0.
|
|
73
|
-
"@taquito/taquito": "^17.0.
|
|
74
|
-
"@taquito/utils": "^17.0.
|
|
71
|
+
"@taquito/core": "^17.1.0-beta-RC.1",
|
|
72
|
+
"@taquito/rpc": "^17.1.0-beta-RC.1",
|
|
73
|
+
"@taquito/taquito": "^17.1.0-beta-RC.1",
|
|
74
|
+
"@taquito/utils": "^17.1.0-beta-RC.1",
|
|
75
75
|
"bignumber.js": "^9.1.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"ts-toolbelt": "^9.6.0",
|
|
104
104
|
"typescript": "~4.1.5"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "c0494008115163a124fa466444585d7f3f1de48c"
|
|
107
107
|
}
|