Comparing version 1.3.5 to 1.3.6
{ | ||
"name": "slopes", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "AVA Platform JS Library", | ||
@@ -61,2 +61,3 @@ "main": "typings/src/index.js", | ||
"elliptic": "^6.5.2", | ||
"libsodium": "^0.7.6", | ||
"secp256k1": "^4.0.0", | ||
@@ -63,0 +64,0 @@ "store2": "^2.10.0" |
@@ -117,3 +117,3 @@ /** | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/admin" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/admin" as the path to rpc's baseurl | ||
*/ | ||
@@ -120,0 +120,0 @@ constructor(core:SlopesCore, baseurl:string = "/ext/admin"){ super(core, baseurl); } |
@@ -164,3 +164,3 @@ /** | ||
/** | ||
* Gets the balance of a particular asset on a subnet. | ||
* Gets the balance of a particular asset on a blockchain. | ||
* | ||
@@ -170,3 +170,3 @@ * @param address The address to pull the asset balance from | ||
* | ||
* @returns Promise with the balance of the assetID on the provided address for the subnet. | ||
* @returns Promise with the balance of the assetID on the provided address for the blockchain. | ||
*/ | ||
@@ -189,3 +189,3 @@ getBalance = async (address:string, assetID:string):Promise<number> => { | ||
/** | ||
* Creates an address (and associated private keys) on a user under a subnet. | ||
* Creates an address (and associated private keys) on a user on a blockchain. | ||
* | ||
@@ -195,3 +195,3 @@ * @param username Name of the user to create the address under | ||
* | ||
* @returns Promise for a string representing the address created by the subnet. | ||
* @returns Promise for a string representing the address created by the vm. | ||
*/ | ||
@@ -375,7 +375,7 @@ createAddress = async (username:string, password:string):Promise<string> => { | ||
/** | ||
* Imports a private key into the node's database under an user and for a subnet. | ||
* Imports a private key into the node's keystore under an user and for a blockchain. | ||
* | ||
* @param username The name of the user to store the private key | ||
* @param password The password that unlocks the user | ||
* @param privateKey A string representing the private key in the subnet's format | ||
* @param privateKey A string representing the private key in the vm's format | ||
* | ||
@@ -401,3 +401,3 @@ * @returns The address for the imported private key. | ||
* | ||
* @returns Promise of an array of address strings in the format specified by the subnet. | ||
* @returns Promise of an array of address strings in the format specified by the blockchain. | ||
*/ | ||
@@ -419,3 +419,3 @@ listAddresses = async (username:string, password:string): Promise<Array<string>> => { | ||
* | ||
* @returns Promise of an array of assetIDs for the address on the subnet. | ||
* @returns Promise of an array of assetIDs for the address on the blockchain. | ||
*/ | ||
@@ -520,3 +520,3 @@ listAssets = async (address:string):Promise<Array<string>> => { | ||
* @param utxoset A set of UTXOs that the transaction is built on | ||
* @param amount The amount of AVA to be spent in NanoAVA | ||
* @param amount The amount of AVA to be spent in $nAVA | ||
* @param toAddresses The addresses to send the funds | ||
@@ -561,3 +561,3 @@ * @param fromAddresses The addresses being used to send the funds from the UTXOs provided | ||
* @param utxoset A set of UTXOs that the transaction is built on | ||
* @param fee The amount of AVA to be paid for fees, in NanoAVA | ||
* @param fee The amount of AVA to be paid for fees, in $nAVA | ||
* @param creatorAddresses The addresses to send the fees | ||
@@ -616,3 +616,3 @@ * @param initialState The [[InitialStates]] that represent the intial state of a created asset | ||
if(typeof tx === 'string'){ | ||
Transaction.fromBuffer(bintools.avaDeserialize(tx)); | ||
Transaction.fromString(tx); | ||
} else if(tx instanceof Buffer){ | ||
@@ -642,3 +642,3 @@ Transaction.fromBuffer(tx); | ||
* @param to The address of the recipient | ||
* @param from An array of addresses managed by the node for this subnet which will fund this transaction | ||
* @param from An array of addresses managed by the node's keystore for this blockchain which will fund this transaction | ||
* | ||
@@ -708,3 +708,3 @@ * @returns Promise for the string representing the transaction's ID. | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/bc/avm" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/bc/avm" as the path to blockchain's baseurl | ||
*/ | ||
@@ -711,0 +711,0 @@ constructor(core:SlopesCore, baseurl:string = "/ext/bc/avm", blockchainID:string = ""){ |
@@ -40,3 +40,3 @@ /** | ||
/** | ||
* Class for representing a private and public keypair in AVAJS. | ||
* Class for representing a private and public keypair in the AVM. | ||
*/ | ||
@@ -195,3 +195,3 @@ export class AVMKeyPair extends KeyPair { | ||
/** | ||
* Class for representing a private and public keypair in AVAJS. | ||
* Class for representing a private and public keypair in Slopes. | ||
*/ | ||
@@ -206,3 +206,3 @@ constructor(chainid:string, entropy:Buffer = undefined) { | ||
/** | ||
* Class for representing a key chain in AVAJS. | ||
* Class for representing a key chain in Slopes. | ||
* | ||
@@ -209,0 +209,0 @@ * @typeparam AVMKeyPair Class extending [[KeyPair]] which is used as the key in [[AVMKeyChain]] |
@@ -602,3 +602,3 @@ /** | ||
* @param blockchainid The {@link https://github.com/feross/buffer|Buffer} representing the BlockchainID for the transaction | ||
* @param amount The amount of AVA to be spent in NanoAVA | ||
* @param amount The amount of AVA to be spent in $nAVA | ||
* @param toAddresses The addresses to send the funds | ||
@@ -677,3 +677,3 @@ * @param fromAddresses The addresses being used to send the funds from the UTXOs {@link https://github.com/feross/buffer|Buffer} | ||
* @param blockchainid The {@link https://github.com/feross/buffer|Buffer} representing the BlockchainID for the transaction | ||
* @param fee The amount of AVA to be paid for fees, in NanoAVA | ||
* @param fee The amount of AVA to be paid for fees, in $nAVA | ||
* @param creatorAddresses The addresses to send the fees | ||
@@ -680,0 +680,0 @@ * @param initialState The [[InitialStates]]that represent the intial state of a created asset |
@@ -89,3 +89,3 @@ /** | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/keystore" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/keystore" as the path to blockchain's baseurl | ||
*/ | ||
@@ -92,0 +92,0 @@ constructor(core:SlopesCore, baseurl:string = "/ext/keystore"){ super(core, baseurl); } |
@@ -101,3 +101,3 @@ /** | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/platform" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/platform" as the path to blockchain's baseurl | ||
*/ | ||
@@ -104,0 +104,0 @@ constructor(core:SlopesCore, baseurl:string = "/ext/platform"){ super(core, baseurl); } |
@@ -82,7 +82,7 @@ /** | ||
/** | ||
* Adds an API to the middleware. The API resolves to a registered subnet's RPC. | ||
* Adds an API to the middleware. The API resolves to a registered blockchain's RPC. | ||
* | ||
* In TypeScript: | ||
* ```js | ||
* slopes.addAPI<MyVMClass>("mysubnet", MyVMClass, "/ext/subnet/mysubnet"); | ||
* slopes.addAPI<MyVMClass>("mychain", MyVMClass, "/ext/bc/mychain"); | ||
* ``` | ||
@@ -92,3 +92,3 @@ * | ||
* ```js | ||
* slopes.addAPI("mysubnet", MyVMClass, "/ext/subnet/mysubnet"); | ||
* slopes.addAPI("mychain", MyVMClass, "/ext/bc/mychain"); | ||
* ``` | ||
@@ -229,3 +229,3 @@ * | ||
/** | ||
* Creates a new AVAJS instance. Sets the address and port of the main AVA Client. | ||
* Creates a new Slopes instance. Sets the address and port of the main AVA Client. | ||
* | ||
@@ -232,0 +232,0 @@ * @param ip The hostname to resolve to reach the AVA Client APIs |
@@ -15,3 +15,3 @@ /** | ||
* const db = DB.getInstance(); | ||
* const subnetdb = db.getNamespace("mysubnet"); | ||
* const blockchaindb = db.getNamespace("mychain"); | ||
* ``` | ||
@@ -18,0 +18,0 @@ */ |
@@ -39,3 +39,3 @@ /** | ||
* | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/ava" | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/bc/avm" | ||
*/ | ||
@@ -72,3 +72,3 @@ setBaseURL = (baseurl:string) => { | ||
* @param core Reference to the Slopes instance using this baseurl | ||
* @param baseurl Path to the baseurl - ex: "/ext/subnet/avm" | ||
* @param baseurl Path to the baseurl - ex: "/ext/bc/avm" | ||
*/ | ||
@@ -133,3 +133,3 @@ constructor(core:SlopesCore, baseurl:string) { | ||
* @param core Reference to the Slopes instance using this endpoint | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/subnet/avm" | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/bc/avm" | ||
* @param jrpcVersion The jrpc version to use, default "2.0". | ||
@@ -499,3 +499,3 @@ */ | ||
"X": n2_avm, | ||
"HD8HEwNKTXRBcVUqvQW2LRu9izqej91xzGmXATF4KMMV6LLm7": n2_avm, | ||
"tgD9UkhtroPPvs3hqfJhNk22bTqpLHBFRKVx2p2WypvUGRg7h": n2_avm, | ||
"platform": n2_platform, | ||
@@ -502,0 +502,0 @@ "P": n2_platform, |
@@ -68,3 +68,3 @@ /** | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/admin" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/admin" as the path to rpc's baseurl | ||
*/ | ||
@@ -71,0 +71,0 @@ constructor(core: SlopesCore, baseurl?: string); |
@@ -25,3 +25,3 @@ "use strict"; | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/admin" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/admin" as the path to rpc's baseurl | ||
*/ | ||
@@ -125,2 +125,2 @@ constructor(core, baseurl = "/ext/admin") { | ||
exports.default = AdminAPI; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaXMvYWRtaW4vYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBSUEsNkNBQThEO0FBRTlEOzs7Ozs7R0FNRztBQUNILE1BQWEsUUFBUyxTQUFRLGVBQU87SUFtR2pDOzs7OztPQUtHO0lBQ0gsWUFBWSxJQUFlLEVBQUUsVUFBaUIsWUFBWTtRQUFHLEtBQUssQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7UUF2R2xGOzs7O1dBSUc7UUFDSCxpQkFBWSxHQUFHLEdBQXlCLEVBQUU7WUFDdEMsSUFBSSxNQUFNLEdBQUcsRUFBRSxDQUFDO1lBQ2hCLE9BQU8sSUFBSSxDQUFDLFVBQVU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HBvcnQgZGVmYXVsdCBBZG1pbkFQSTsiXX0= |
@@ -100,3 +100,3 @@ /** | ||
/** | ||
* Gets the balance of a particular asset on a subnet. | ||
* Gets the balance of a particular asset on a blockchain. | ||
* | ||
@@ -106,7 +106,7 @@ * @param address The address to pull the asset balance from | ||
* | ||
* @returns Promise with the balance of the assetID on the provided address for the subnet. | ||
* @returns Promise with the balance of the assetID on the provided address for the blockchain. | ||
*/ | ||
getBalance: (address: string, assetID: string) => Promise<number>; | ||
/** | ||
* Creates an address (and associated private keys) on a user under a subnet. | ||
* Creates an address (and associated private keys) on a user on a blockchain. | ||
* | ||
@@ -116,3 +116,3 @@ * @param username Name of the user to create the address under | ||
* | ||
* @returns Promise for a string representing the address created by the subnet. | ||
* @returns Promise for a string representing the address created by the vm. | ||
*/ | ||
@@ -211,7 +211,7 @@ createAddress: (username: string, password: string) => Promise<string>; | ||
/** | ||
* Imports a private key into the node's database under an user and for a subnet. | ||
* Imports a private key into the node's keystore under an user and for a blockchain. | ||
* | ||
* @param username The name of the user to store the private key | ||
* @param password The password that unlocks the user | ||
* @param privateKey A string representing the private key in the subnet's format | ||
* @param privateKey A string representing the private key in the vm's format | ||
* | ||
@@ -227,3 +227,3 @@ * @returns The address for the imported private key. | ||
* | ||
* @returns Promise of an array of address strings in the format specified by the subnet. | ||
* @returns Promise of an array of address strings in the format specified by the blockchain. | ||
*/ | ||
@@ -236,3 +236,3 @@ listAddresses: (username: string, password: string) => Promise<string[]>; | ||
* | ||
* @returns Promise of an array of assetIDs for the address on the subnet. | ||
* @returns Promise of an array of assetIDs for the address on the blockchain. | ||
*/ | ||
@@ -277,3 +277,3 @@ listAssets: (address: string) => Promise<string[]>; | ||
* @param utxoset A set of UTXOs that the transaction is built on | ||
* @param amount The amount of AVA to be spent in NanoAVA | ||
* @param amount The amount of AVA to be spent in $nAVA | ||
* @param toAddresses The addresses to send the funds | ||
@@ -298,3 +298,3 @@ * @param fromAddresses The addresses being used to send the funds from the UTXOs provided | ||
* @param utxoset A set of UTXOs that the transaction is built on | ||
* @param fee The amount of AVA to be paid for fees, in NanoAVA | ||
* @param fee The amount of AVA to be paid for fees, in $nAVA | ||
* @param creatorAddresses The addresses to send the fees | ||
@@ -334,3 +334,3 @@ * @param initialState The [[InitialStates]] that represent the intial state of a created asset | ||
* @param to The address of the recipient | ||
* @param from An array of addresses managed by the node for this subnet which will fund this transaction | ||
* @param from An array of addresses managed by the node's keystore for this blockchain which will fund this transaction | ||
* | ||
@@ -348,3 +348,3 @@ * @returns Promise for the string representing the transaction's ID. | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/bc/avm" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/bc/avm" as the path to blockchain's baseurl | ||
*/ | ||
@@ -351,0 +351,0 @@ constructor(core: SlopesCore, baseurl?: string, blockchainID?: string); |
@@ -9,3 +9,3 @@ /** | ||
/** | ||
* Class for representing a private and public keypair in AVAJS. | ||
* Class for representing a private and public keypair in the AVM. | ||
*/ | ||
@@ -91,3 +91,3 @@ export declare class AVMKeyPair extends KeyPair { | ||
/** | ||
* Class for representing a private and public keypair in AVAJS. | ||
* Class for representing a private and public keypair in Slopes. | ||
*/ | ||
@@ -97,3 +97,3 @@ constructor(chainid: string, entropy?: Buffer); | ||
/** | ||
* Class for representing a key chain in AVAJS. | ||
* Class for representing a key chain in Slopes. | ||
* | ||
@@ -100,0 +100,0 @@ * @typeparam AVMKeyPair Class extending [[KeyPair]] which is used as the key in [[AVMKeyChain]] |
@@ -44,7 +44,7 @@ "use strict"; | ||
/** | ||
* Class for representing a private and public keypair in AVAJS. | ||
* Class for representing a private and public keypair in the AVM. | ||
*/ | ||
class AVMKeyPair extends types_2.KeyPair { | ||
/** | ||
* Class for representing a private and public keypair in AVAJS. | ||
* Class for representing a private and public keypair in Slopes. | ||
*/ | ||
@@ -194,3 +194,3 @@ constructor(chainid, entropy = undefined) { | ||
/** | ||
* Class for representing a key chain in AVAJS. | ||
* Class for representing a key chain in Slopes. | ||
* | ||
@@ -268,2 +268,2 @@ * @typeparam AVMKeyPair Class extending [[KeyPair]] which is used as the key in [[AVMKeyChain]] | ||
exports.AVMKeyChain = AVMKeyChain; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5Y2hhaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBpcy9hdm0va2V5Y2hhaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUE7O0dBRUc7QUFDSCxvQ0FBK0I7QUFDL0IsbURBQXFDO0FBQ3JDLG9FQUE0QztBQUM1Qyw2QkFBc0M7QUFDdEMsbUNBQTRDO0FBRTVDLDhEQUFxQztBQUNyQyw2Q0FBc0Q7QUFFdEQ7O0dBRUc7QUFDSCxNQUFNLEVBQUUsR0FBRyxRQUFRLENBQUMsRUFBRSxDQUFDO0FBRXZCOztHQUVHO0FBQ0gsTUFBTSxFQUFFLEdBQUcsSUFBSSxFQUFFLENBQUMsV0FBVyxDQUFDLENBQUM7QUFFL0I7O0dBRUc7QUFDSCxNQUFNLFFBQVEsR0FBRyxFQUFFLENBQUMsS0FBSyxDQUFDO0FBRTFCOztHQUVHO0FBQ0gsTUFBTSxFQUFFLEdBQUcsUUFBUSxDQUFDLENBQUMsQ0FBQyxXQUFXLENBQUM7QUFFbEM7O0dBRUc7QUFDSCxNQUFNLFFBQVEsR0FBRyxrQkFBUSxDQUFDLFdBQVcsRUFBRSxDQUFDO0FBR3hDOztHQUVHO0FBQ0gsTUFBYSxVQUFXLFNBQVEsZUFBTztJQXVKbkM7O09BRUc7SUFDSCxZQUFZLE9BQWMsRUFBRSxVQUFpQixTQUFTO1FBQ2xELEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQXhKbkI7O1dBRUc7UUFDTyxzQkFBaUIsR0FBRyxDQUFDLEdBQVUsRUFBK0I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2lnSWR4PiA9IChpbnNbaV0gYXMgU2VjcElucHV0KS5nZXRTaWdJZHhzKCk7XG4gICAgICAgICAgICBmb3IobGV0IGogPSAwOyBqIDwgc2lnaWR4cy5sZW5ndGg7IGorKyl7XG4gICAgICAgICAgICAgICAgbGV0IGtleXBhaXI6QVZNS2V5UGFpciA9IHRoaXMuZ2V0S2V5KHNpZ2lkeHNbal0uZ2V0U291cmNlKCkpO1xuICAgICAgICAgICAgICAgIGxldCBzaWdudmFsOkJ1ZmZlciA9IGtleXBhaXIuc2lnbihtc2cpXG4gICAgICAgICAgICAgICAgbGV0IHNpZzpTaWduYXR1cmUgPSBuZXcgU2lnbmF0dXJlKCk7XG4gICAgICAgICAgICAgICAgc2lnLmZyb21CdWZmZXIoc2lnbnZhbCk7XG4gICAgICAgICAgICAgICAgYXJyc2lncy5wdXNoKHNpZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzaWdzLnB1c2goYXJyc2lncyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ldyBUeCh1dHgsIHNpZ3MpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgaW5zdGFuY2Ugb2YgQVZNS2V5Q2hhaW4uXG4gICAgICovXG4gICAgY29uc3RydWN0b3IoY2hhaW5pZDpzdHJpbmcpe1xuICAgICAgICBzdXBlcihjaGFpbmlkKTtcbiAgICB9XG59Il19 |
@@ -278,3 +278,3 @@ /** | ||
* @param blockchainid The {@link https://github.com/feross/buffer|Buffer} representing the BlockchainID for the transaction | ||
* @param amount The amount of AVA to be spent in NanoAVA | ||
* @param amount The amount of AVA to be spent in $nAVA | ||
* @param toAddresses The addresses to send the funds | ||
@@ -296,3 +296,3 @@ * @param fromAddresses The addresses being used to send the funds from the UTXOs {@link https://github.com/feross/buffer|Buffer} | ||
* @param blockchainid The {@link https://github.com/feross/buffer|Buffer} representing the BlockchainID for the transaction | ||
* @param fee The amount of AVA to be paid for fees, in NanoAVA | ||
* @param fee The amount of AVA to be paid for fees, in $nAVA | ||
* @param creatorAddresses The addresses to send the fees | ||
@@ -299,0 +299,0 @@ * @param initialState The [[InitialStates]]that represent the intial state of a created asset |
@@ -54,3 +54,3 @@ /** | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/keystore" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/keystore" as the path to blockchain's baseurl | ||
*/ | ||
@@ -57,0 +57,0 @@ constructor(core: SlopesCore, baseurl?: string); |
@@ -27,3 +27,3 @@ "use strict"; | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/keystore" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/keystore" as the path to blockchain's baseurl | ||
*/ | ||
@@ -98,2 +98,2 @@ constructor(core, baseurl = "/ext/keystore") { | ||
exports.default = KeystoreAPI; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaXMva2V5c3RvcmUvYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBSUEsNkNBQThEO0FBRTlEOzs7Ozs7OztHQVFHO0FBQ0gsTUFBTSxXQUFZLFNBQVEsZUFBTztJQXFFN0I7Ozs7O09BS0c7SUFDSCxZQUFZLElBQWUsRUFBRSxVQUFpQixlQUFlO1FBQUcsS0FBSyxDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0FBQztRQXpFckY7Ozs7Ozs7V0FPRztRQUNILGVBQVUsR0FBRyxDQUFPLFFBQWUsRUFBRSxRQUFlLEVBQW1CLEVBQUU7WUFDckUsSUFBSSxNQUFNLEdBQUc7Z0JBQ1QsVUFBVSxFQUFFLFFBQVE7Z0JBQ3BCLFVBQVUsRUFBRSxRQUFRO2FBQ3ZCLENBQUM7WUFDRixPQUFPLElBQ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cmw6c3RyaW5nID0gXCIvZXh0L2tleXN0b3JlXCIpeyBzdXBlcihjb3JlLCBiYXNldXJsKTsgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBLZXlzdG9yZUFQSTsiXX0= |
@@ -59,3 +59,3 @@ /** | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/platform" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/platform" as the path to blockchain's baseurl | ||
*/ | ||
@@ -62,0 +62,0 @@ constructor(core: SlopesCore, baseurl?: string); |
@@ -25,3 +25,3 @@ "use strict"; | ||
* @param core A reference to the Slopes class | ||
* @param baseurl Defaults to the string "/ext/platform" as the path to subnets baseurl | ||
* @param baseurl Defaults to the string "/ext/platform" as the path to blockchain's baseurl | ||
*/ | ||
@@ -109,2 +109,2 @@ constructor(core, baseurl = "/ext/platform") { | ||
exports.default = PlatformAPI; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaXMvcGxhdGZvcm0vYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBSUEsNkNBQWlFO0FBRWpFOzs7Ozs7R0FNRztBQUNILE1BQU0sV0FBWSxTQUFRLGVBQU87SUFtRjdCOzs7OztPQUtHO0lBQ0gsWUFBWSxJQUFlLEVBQUUsVUFBaUIsZUFBZTtRQUFHLEtBQUssQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7UUF2RnJGOzs7Ozs7V0FNRztRQUNILGNBQVMsR0FBRyxDQUFPLEVBQVMsRUFBbUIsRUFBRTtZQUM3QyxJQUFJLE1BQU0sR0FBRztnQkFDVCxJQUFJLEVBQUUsRUFBRTthQUNYLENBQUM7WUFDRixPQUFPLElBQUksQ0FBQyxVQUFVLENBQUMsb0JBQW9CL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ZTpSZXF1ZXN0UmVzcG9uc2VEYXRhKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuZGF0YVtcInJlc3VsdFwiXVtcInZhbGlkYXRvcnNcIl07XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgY2xhc3Mgc2hvdWxkIG5vdCBiZSBpbnN0YW50aWF0ZWQgZGlyZWN0bHkuIEluc3RlYWQgdXNlIHRoZSBbW1Nsb3Blcy5hZGRBUEldXSBtZXRob2QuXG4gICAgICogXG4gICAgICogQHBhcmFtIGNvcmUgQSByZWZlcmVuY2UgdG8gdGhlIFNsb3BlcyBjbGFzc1xuICAgICAqIEBwYXJhbSBiYXNldXJsIERlZmF1bHRzIHRvIHRoZSBzdHJpbmcgXCIvZXh0L3BsYXRmb3JtXCIgYXMgdGhlIHBhdGggdG8gYmxvY2tjaGFpbidzIGJhc2V1cmxcbiAgICAgKi9cbiAgICBjb25zdHJ1Y3Rvcihjb3JlOlNsb3Blc0NvcmUsIGJhc2V1cmw6c3RyaW5nID0gXCIvZXh0L3BsYXRmb3JtXCIpeyBzdXBlcihjb3JlLCBiYXNldXJsKTsgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBQbGF0Zm9ybUFQSTsiXX0= |
@@ -57,7 +57,7 @@ /** | ||
/** | ||
* Adds an API to the middleware. The API resolves to a registered subnet's RPC. | ||
* Adds an API to the middleware. The API resolves to a registered blockchain's RPC. | ||
* | ||
* In TypeScript: | ||
* ```js | ||
* slopes.addAPI<MyVMClass>("mysubnet", MyVMClass, "/ext/subnet/mysubnet"); | ||
* slopes.addAPI<MyVMClass>("mychain", MyVMClass, "/ext/bc/mychain"); | ||
* ``` | ||
@@ -67,3 +67,3 @@ * | ||
* ```js | ||
* slopes.addAPI("mysubnet", MyVMClass, "/ext/subnet/mysubnet"); | ||
* slopes.addAPI("mychain", MyVMClass, "/ext/bc/mychain"); | ||
* ``` | ||
@@ -152,3 +152,3 @@ * | ||
/** | ||
* Creates a new AVAJS instance. Sets the address and port of the main AVA Client. | ||
* Creates a new Slopes instance. Sets the address and port of the main AVA Client. | ||
* | ||
@@ -155,0 +155,0 @@ * @param ip The hostname to resolve to reach the AVA Client APIs |
@@ -31,3 +31,3 @@ "use strict"; | ||
/** | ||
* Creates a new AVAJS instance. Sets the address and port of the main AVA Client. | ||
* Creates a new Slopes instance. Sets the address and port of the main AVA Client. | ||
* | ||
@@ -91,7 +91,7 @@ * @param ip The hostname to resolve to reach the AVA Client APIs | ||
/** | ||
* Adds an API to the middleware. The API resolves to a registered subnet's RPC. | ||
* Adds an API to the middleware. The API resolves to a registered blockchain's RPC. | ||
* | ||
* In TypeScript: | ||
* ```js | ||
* slopes.addAPI<MyVMClass>("mysubnet", MyVMClass, "/ext/subnet/mysubnet"); | ||
* slopes.addAPI<MyVMClass>("mychain", MyVMClass, "/ext/bc/mychain"); | ||
* ``` | ||
@@ -101,3 +101,3 @@ * | ||
* ```js | ||
* slopes.addAPI("mysubnet", MyVMClass, "/ext/subnet/mysubnet"); | ||
* slopes.addAPI("mychain", MyVMClass, "/ext/bc/mychain"); | ||
* ``` | ||
@@ -234,2 +234,2 @@ * | ||
exports.default = SlopesCore; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xvcGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Nsb3Blcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBOztHQUVHO0FBQ0gseUNBQTZEO0FBQzdELGtEQUEwQjtBQUcxQjs7Ozs7Ozs7R0FRRztBQUNILE1BQXFCLFVBQVU7SUFpTjNCOzs7Ozs7T0FNRztJQUNILFlBQVksRUFBUyxFQUFFLElBQVcsRUFBRSxXQUFrQixNQUFNO1FBdk5sRCxjQUFTLEdBQVUsQ0FBQyxDQUFDO1FBS3JCLFNBQUks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gICAgICAgICAgICAgICBiYXNlVVJMOnRoaXMucHJvdG9jb2wrXCI6Ly9cIit0aGlzLmlwK1wiOlwiK3RoaXMucG9ydCxcbiAgICAgICAgICAgICAgICByZXNwb25zZVR5cGU6ICd0ZXh0J1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBjb25maWcudXJsID0gYmFzZXVybDtcbiAgICAgICAgY29uZmlnLm1ldGhvZCA9IHhocm1ldGhvZDtcbiAgICAgICAgY29uZmlnLmhlYWRlcnMgPSBoZWFkZXJzO1xuICAgICAgICBjb25maWcuZGF0YSA9IHBvc3RkYXRhO1xuICAgICAgICBjb25maWcucGFyYW1zID0gZ2V0ZGF0YTtcbiAgICAgICAgcmV0dXJuIGF4aW9zLnJlcXVlc3QoY29uZmlnKS50aGVuKChyZXNwOkF4aW9zUmVzcG9uc2U8YW55PikgPT4ge1xuICAgICAgICAgICAgLy9wdXJnaW5nIGFsbCB0aGF0IGlzIGF4aW9zXG4gICAgICAgICAgICBsZXQgeGhyZGF0YTpSZXF1ZXN0UmVzcG9uc2VEYXRhID0gbmV3IFJlcXVlc3RSZXNwb25zZURhdGEoKTtcbiAgICAgICAgICAgIHhocmRhdGEuZGF0YSA9IHJlc3AuZGF0YTtcbiAgICAgICAgICAgIHhocmRhdGEuaGVhZGVycyA9IHJlc3AuaGVhZGVycztcbiAgICAgICAgICAgIHhocmRhdGEucmVxdWVzdCA9IHJlc3AucmVxdWVzdDtcbiAgICAgICAgICAgIHhocmRhdGEuc3RhdHVzID0gcmVzcC5zdGF0dXM7XG4gICAgICAgICAgICB4aHJkYXRhLnN0YXR1c1RleHQgPSByZXNwLnN0YXR1c1RleHQ7XG4gICAgICAgICAgICByZXR1cm4geGhyZGF0YTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogTWFrZXMgYSBHRVQgY2FsbCB0byBhbiBBUEkuXG4gICAgICogXG4gICAgICogQHBhcmFtIGJhc2V1cmwgUGF0aCB0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vc0NvbmZpZyk7XG4gICAgfVxuICAgIFxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBuZXcgU2xvcGVzIGluc3RhbmNlLiBTZXRzIHRoZSBhZGRyZXNzIGFuZCBwb3J0IG9mIHRoZSBtYWluIEFWQSBDbGllbnQuXG4gICAgICogXG4gICAgICogQHBhcmFtIGlwIFRoZSBob3N0bmFtZSB0byByZXNvbHZlIHRvIHJlYWNoIHRoZSBBVkEgQ2xpZW50IEFQSXNcbiAgICAgKiBAcGFyYW0gcG9ydCBUaGUgcG9ydCB0byByZW9sdmUgdG8gcmVhY2ggdGhlIEFWQSBDbGllbnQgQVBJc1xuICAgICAqIEBwYXJhbSBwcm90b2NvbCBUaGUgcHJvdG9jb2wgc3RyaW5nIHRvIHVzZSBiZWZvcmUgYSBcIjovL1wiIGluIGEgcmVxdWVzdCwgZXg6IFwiaHR0cFwiLCBcImh0dHBzXCIsIFwiZ2l0XCIsIFwid3NcIiwgZXRjIC4uLlxuICAgICAqL1xuICAgIGNvbnN0cnVjdG9yKGlwOnN0cmluZywgcG9ydDpudW1iZXIsIHByb3RvY29sOnN0cmluZyA9IFwiaHR0cFwiKXtcbiAgICAgICAgdGhpcy5zZXRBZGRyZXNzKGlwLCBwb3J0LCBwcm90b2NvbCk7XG4gICAgfVxufSJdfQ== |
@@ -10,3 +10,3 @@ import { StoreAPI } from "store2"; | ||
* const db = DB.getInstance(); | ||
* const subnetdb = db.getNamespace("mysubnet"); | ||
* const blockchaindb = db.getNamespace("mychain"); | ||
* ``` | ||
@@ -13,0 +13,0 @@ */ |
@@ -18,3 +18,3 @@ "use strict"; | ||
* const db = DB.getInstance(); | ||
* const subnetdb = db.getNamespace("mysubnet"); | ||
* const blockchaindb = db.getNamespace("mychain"); | ||
* ``` | ||
@@ -45,2 +45,2 @@ */ | ||
DB.store = store2_1.default; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGIuanMiLCJzb3VyY2V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biB0byBncmFiIHRoZSBzaW5nbGV0b24gaW5zdGFuY2Ugb2YgdGhlIGRhdGFiYXNlLlxuICogXG4gKiBgYGBqc1xuICogY29uc3QgZGIgPSBEQi5nZXRJbnN0YW5jZSgpO1xuICogY29uc3Qgc3VibmV0ZGIgPSBkYi5nZXROYW1lc3BhY2UoXCJteXN1Ym5ldFwiKTtcbiAqIGBgYFxuICovXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBEQiB7XG4gICAgcHJpdmF0ZSBzdGF0aWMgIGluc3RhbmNlOkRCO1xuICAgIHByaXZhdGUgc3RhdGljIHN0b3JlID0gc3RvcmU7XG4gICAgcHJpdmF0ZSBjb25zdHJ1Y3RvcigpIHt9XG5cbiAgICAvKipcbiAgICAgKiBSZXRyaWV2ZXMgdGhlIGRhdGFiYXNlIHNpbmdsZXRvbi4gXG4gICAgICovXG4gICAgc3RhdGljIGdldEluc3RhbmNlKCk6IERCIHtcbiAgICAgICAgaWYgKCFEQi5pbnN0YW5jZSkge1xuICAgICAgICAgICAgREIuaW5zdGFuY2UgPSBuZXcgREIoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gREIuaW5zdGFuY2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogR2V0cyBhIG5hbWVzcGFjZSBmcm9tIHRoZSBkYXRhYmFzZSBzaW5nbGV0b24uXG4gICAgICogXG4gICAgICogQHBhcmFtIG5zIE5hbWVzcGFjZSB0byByZXRyaWV2ZS5cbiAgICAgKi9cbiAgICBzdGF0aWMgZ2V0TmFtZXNwYWNlKG5zOnN0cmluZyk6IFN0b3JlQVBJe1xuICAgICAgICByZXR1cm4gdGhpcy5zdG9yZS5uYW1lc3BhY2UobnMpO1xuICAgIH1cblxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvZGIud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RhdGFiYXNlLlxuICogXG4gKiBgYGBqc1xuICogY29uc3QgZGIgPSBEQi5nZXRJbnN0YW5jZSgpO1xuICogY29uc3QgYmxvY2tjaGFpbmRiID0gZGIuZ2V0TmFtZXNwYWNlKFwibXljaGFpblwiKTtcbiAqIGBgYFxuICovXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBEQiB7XG4gICAgcHJpdmF0ZSBzdGF0aWMgIGluc3RhbmNlOkRCO1xuICAgIHByaXZhdGUgc3RhdGljIHN0b3JlID0gc3RvcmU7XG4gICAgcHJpdmF0ZSBjb25zdHJ1Y3RvcigpIHt9XG5cbiAgICAvKipcbiAgICAgKiBSZXRyaWV2ZXMgdGhlIGRhdGFiYXNlIHNpbmdsZXRvbi4gXG4gICAgICovXG4gICAgc3RhdGljIGdldEluc3RhbmNlKCk6IERCIHtcbiAgICAgICAgaWYgKCFEQi5pbnN0YW5jZSkge1xuICAgICAgICAgICAgREIuaW5zdGFuY2UgPSBuZXcgREIoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gREIuaW5zdGFuY2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogR2V0cyBhIG5hbWVzcGFjZSBmcm9tIHRoZSBkYXRhYmFzZSBzaW5nbGV0b24uXG4gICAgICogXG4gICAgICogQHBhcmFtIG5zIE5hbWVzcGFjZSB0byByZXRyaWV2ZS5cbiAgICAgKi9cbiAgICBzdGF0aWMgZ2V0TmFtZXNwYWNlKG5zOnN0cmluZyk6IFN0b3JlQVBJe1xuICAgICAgICByZXR1cm4gdGhpcy5zdG9yZS5uYW1lc3BhY2UobnMpO1xuICAgIH1cblxufVxuIl19 |
@@ -29,3 +29,3 @@ /// <reference types="node" /> | ||
* | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/ava" | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/bc/avm" | ||
*/ | ||
@@ -44,3 +44,3 @@ setBaseURL: (baseurl: string) => void; | ||
* @param core Reference to the Slopes instance using this baseurl | ||
* @param baseurl Path to the baseurl - ex: "/ext/subnet/avm" | ||
* @param baseurl Path to the baseurl - ex: "/ext/bc/avm" | ||
*/ | ||
@@ -60,3 +60,3 @@ constructor(core: SlopesCore, baseurl: string); | ||
* @param core Reference to the Slopes instance using this endpoint | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/subnet/avm" | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/bc/avm" | ||
* @param jrpcVersion The jrpc version to use, default "2.0". | ||
@@ -300,3 +300,3 @@ */ | ||
"X": object; | ||
"HD8HEwNKTXRBcVUqvQW2LRu9izqej91xzGmXATF4KMMV6LLm7": object; | ||
"tgD9UkhtroPPvs3hqfJhNk22bTqpLHBFRKVx2p2WypvUGRg7h": object; | ||
"platform": object; | ||
@@ -303,0 +303,0 @@ "P": object; |
@@ -35,3 +35,3 @@ "use strict"; | ||
* @param core Reference to the Slopes instance using this baseurl | ||
* @param baseurl Path to the baseurl - ex: "/ext/subnet/avm" | ||
* @param baseurl Path to the baseurl - ex: "/ext/bc/avm" | ||
*/ | ||
@@ -42,3 +42,3 @@ constructor(core, baseurl) { | ||
* | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/ava" | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/bc/avm" | ||
*/ | ||
@@ -79,3 +79,3 @@ this.setBaseURL = (baseurl) => { | ||
* @param core Reference to the Slopes instance using this endpoint | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/subnet/avm" | ||
* @param baseurl Path of the APIs baseurl - ex: "/ext/bc/avm" | ||
* @param jrpcVersion The jrpc version to use, default "2.0". | ||
@@ -376,3 +376,3 @@ */ | ||
"X": n2_avm, | ||
"HD8HEwNKTXRBcVUqvQW2LRu9izqej91xzGmXATF4KMMV6LLm7": n2_avm, | ||
"tgD9UkhtroPPvs3hqfJhNk22bTqpLHBFRKVx2p2WypvUGRg7h": n2_avm, | ||
"platform": n2_platform, | ||
@@ -408,2 +408,2 @@ "P": n2_platform, | ||
};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RkcmVzcyBvciBLUENsYXNzIHRvIHJlbW92ZVxuICAgICAqIFxuICAgICAqIEByZXR1cm5zIFRoZSBib29sZWFuIHRydWUgaWYgYSBrZXkgd2FzIHJlbW92ZWQuXG4gICAgICovXG4gICAgcmVtb3ZlS2V5ID0gKGtleTpLUENsYXNzIHwgQnVmZmVyKSA9PiB7XG4gICAgICAgIGxldCBrYWRkcjpzdHJpbmc7XG4gICAgICAgIGlmKGtleSBpbnN0YW5jZW9mIEJ1ZmZlcil7XG4gICAgICAgICAgICBrYWRkciA9IGtleS50b1N0cmluZyhcImhleFwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGthZGRyID0ga2V5LmdldEFkZHJlc3MoKS50b1N0cmluZyhcImhleFwiKTtcbiAgICAgICAgfVxuICAgICAgICBpZihrYWRkciBpbiB0aGlzLmtleXMpe1xuICAgICAgICAgICAgZGVsZXRlIHRoaXMua2V5c1trYWRkcl07XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENoZWNrcyBpZiB0aGVyZSBpcyBhIGtleSBhc3NvY2lhdGVkIHdpdGggdGhlIHByb3ZpZGVkIGFkZHJlc3MuXG4gICAgICogXG4gICAgICogQHBhcmFtIGFkZHJlc3MgVGhlIGFkZHJlc3MgdG8gY2hlY2sgZm9yIGV4aXN0ZW5jZSBpbiB0aGUga2V5cyBkYXRhYmFzZVxuICAgICAqIFxuICAgICAqIEByZXR1cm5zIFRydWUgb24gc3VjY2VzcywgZmFsc2UgaWYgbm90IGZvdW5kXG4gICAgICovXG4gICAgaGFzS2V5ID0gKGFkZHJlc3M6QnVmZmVyKTpib29sZWFuID0+IHtcbiAgICAgICAgcmV0dXJuIChhZGRyZXNzLnRvU3RyaW5nKFwiaGV4XCIpIGluIHRoaXMua2V5cyk7XG4gICA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cmluZyk6UHJvbWlzZTxSZXF1ZXN0UmVzcG9uc2VEYXRhPiA9PiB7XG4gICAgICAgIGxldCBlcCA9IGJhc2V1cmwgPyBiYXNldXJsIDogdGhpcy5iYXNldXJsO1xuICAgICAgICBsZXQgcnBjOm9iamVjdCA9IHt9O1xuICAgICAgICBycGNbXCJpZFwiXSA9IHRoaXMucnBjaWQ7XG4gICAgICAgIHJwY1tcIm1ldGhvZFwiXSA9IG1ldGhvZDtcblxuICAgICAgICAvLyBTZXQgcGFyYW1ldGVycyBpZiBleGlzdHNcbiAgICAgICAgaWYocGFyYW1zKXtcbiAgICAgICAgICAgIHJwY1sncGFyYW1zJ10gPSBwYXJhbXM7XG4gICAgICAgIH0gZWxzZSBpZih0aGlzLmpycGNWZXJzaW9uID09IFwiMS4wXCIpe1xuICAgICAgICAgICAgcnBjW1wicGFyYW1zXCJdID0gW107XG4gICAgICAgIH1cblxuICAgICAgICBpZih0aGlzLmpycGNWZXJzaW9uICE9IFwiMS4wXCIpIHtcbiAgICAgICAgICAgIHJwY1tcImpzb25ycGNcIl0gPSB0aGlzLmpycGNWZXJzaW9uO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IGhlYWRlcnM6b2JqZWN0ID0ge1wiQ29udGVudC1UeXBlXCI6IFwiYXBwbGljYXRpb24vanNvbjtjaGFyc2V0PVVURi04XCJ9O1xuXG4gICAgICAgIGxldCBheENvbmY6QXhpb3NSZXF1ZXN0Q29uZmlnID0ge1xuICAgICAgICAgICAgYmFzZVVSTDp0aGlzLmNvcmUuZ2V0UHJvdG9jb2woKStcIjovL1wiK3RoaXMuY29yZS5nZXRJUCgpK1wiOlwiK3RoaXMuY29yZS5nZXRQb3J0KCksXG4gICAgICAgICAgICByZXNwb25zZVR5cGU6ICdqc29uJ1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiB0aGlzLmNvcmUucG9zdChlcCwge30sIEpTT04uc3RyaW5naWZ5KHJwYyksIGhlYWRlcnMsIGF4Q29uZikudGhlbiggKHJlc3A6UmVxdWVzdFJlc3BvbnNlRGF0YSkgPT4ge1xuICAgICAgICAgICAgaWYocmVzcC5zdGF0dXMgPj0gMjAwICYmIHJlc3Auc3RhdHVzIDwgMzAwKXtcbiAgICAgICAgICAgICAgICB0aGlzLnJwY2lkICs9IDE7XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHJlc3AuZGF0YSA9PT0gXCJzdHJpbmdcIil7XG4gICAgICAgICAgICAgICAgICAgIHJlc3AuZGF0YSA9IEpTT04ucGFyc2UocmVzcC5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiByZXNwLmRhdGEgPT09ICdvYmplY3QnICYmICdlcnJvcicgaW4gcmVzcC5kYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkVycm9yIHJldHVybmVkOiBcIiArIEpTT04uc3RyaW5naWZ5KHJlc3AuZGF0YSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfSAgIFxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyB0aGUgcnBjaWQsIGEgc3RyaWN0bHktaW5jcmVhc2luZyBudW1iZXIsIHN0YXJ0aW5nIGZyb20gMSwgaW5kaWNhdGluZyB0aGUgbmV4dCByZXF1ZXN0IElEIHRoYXQgd2lsbCBiZSBzZW50LlxuICAgICAqL1xuICAgIGdldFJQQ0lEID0gKCk6bnVtYmVyID0+IHtcbiAgICAgICAgcmV0dXJuIHRoaXMucnBjaWQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogXG4gICAgICogQHBhcmFtIGNvcmUgUmVmZXJlbmNlIHRvIHRoZSBTbG9wZXMgaW5zdGFuY2UgdXNpbmcgdGhpcyBlbmRwb2ludFxuICAgICAqIEBwYXJhbS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jJfcGxhdGZvcm0sXG4gICAgICAgICAgICBcImNvbnRyYWN0c1wiOiBuMl9jb250cmFjdHMsXG4gICAgICAgICAgICBcIkNcIjogbjJfY29udHJhY3RzLFxuICAgICAgICAgICAgXCJCQ0lEMlwiOiBuMl9jb250cmFjdHNcbiAgICAgICAgfSxcbiAgICAgICAgMTIzNDU6IHtcbiAgICAgICAgICAgIFwiYXZtXCI6IG4yX2F2bSxcbiAgICAgICAgICAgIFwiWFwiOiBuMl9hdm0sXG4gICAgICAgICAgICBcIkdKQUJyWjlBNlVRRnB3alBVOE1EeERkOHZ1eVJvRFZlREFYYzY5NHdKNXQzekVraFVcIjogbjJfYXZtLFxuICAgICAgICAgICAgXCJwbGF0Zm9ybVwiOiBuMl9wbGF0Zm9ybSxcbiAgICAgICAgICAgIFwiUFwiOiBuMl9wbGF0Zm9ybSxcbiAgICAgICAgICAgIFwiQkNJRDFcIjogbjJfcGxhdGZvcm0sXG4gICAgICAgICAgICBcImNvbnRyYWN0c1wiOiBuMl9jb250cmFjdHMsXG4gICAgICAgICAgICBcIkNcIjogbjJfY29udHJhY3RzLFxuICAgICAgICAgICAgXCJCQ0lEMlwiOiBuMl9jb250cmFjdHNcbiAgICAgICAgfVxuICAgIH07XG59Il19 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2716863
136
8
+ Addedlibsodium@^0.7.6
+ Addedlibsodium@0.7.15(transitive)