@openfort/openfort-js 0.8.35 → 0.8.37
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/cjs/sdk/src/chains/index.js +1 -1
- package/dist/cjs/sdk/src/evm/personalSign.js +1 -1
- package/dist/cjs/sdk/src/utils/crypto.js +1 -1
- package/dist/cjs/sdk/src/version.js +1 -1
- package/dist/sdk/src/chains/index.js +1 -1
- package/dist/sdk/src/evm/personalSign.js +1 -1
- package/dist/sdk/src/utils/crypto.js +1 -1
- package/dist/sdk/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.chainRpcs={1:"https://cloudflare-eth.com",10:"https://optimism-rpc.publicnode.com",56:"https://bsc.publicnode.com",97:"https://bsc-testnet.publicnode.com",137:"https://polygon-rpc.com",204:"https://opbnb-mainnet-rpc.bnbchain.org",255:"https://api.kroma.network",300:"https://sepolia.era.zksync.dev",324:"https://mainnet.era.zksync.io",1946:"https://rpc.minato.soneium.org",2358:"https://api.sepolia.kroma.network",2741:"https://api.mainnet.abs.xyz",3939:"https://test.doschain.com",4337:"https://build.onbeam.com/rpc",5611:"https://opbnb-testnet-rpc.bnbchain.org",7979:"https://main.doschain.com",8453:"https://mainnet.base.org",11124:"https://api.testnet.abs.xyz",13337:"https://build.onbeam.com/rpc/testnet",13473:"https://rpc.testnet.immutable.com",42161:"https://arb1.arbitrum.io/rpc",42170:"https://nova.arbitrum.io/rpc",43113:"https://api.avax-test.network/ext/bc/C/rpc",43114:"https://api.avax.network/ext/bc/C/rpc",50104:"https://rpc.sophon.xyz",80002:"https://rpc-amoy.polygon.technology",84532:"https://sepolia.base.org",247253:"https://rpc-testnet.saakuru.network",421614:"https://sepolia-rollup.arbitrum.io/rpc",7225878:"https://rpc.saakuru.network",7777777:"https://rpc.zora.energy/",11155111:"https://ethereum-sepolia-rpc.publicnode.com",11155420:"https://optimism-sepolia-rpc.publicnode.com",28122024:"https://rpcv2-testnet.ancient8.gg",531050104:"https://rpc.testnet.sophon.xyz",666666666:"https://rpc.degen.tips",888888888:"https://rpc.ancient8.gg",999999999:"https://sepolia.rpc.zora.energy"};
|
|
1
|
+
"use strict";exports.chainRpcs={1:"https://cloudflare-eth.com",10:"https://optimism-rpc.publicnode.com",56:"https://bsc.publicnode.com",97:"https://bsc-testnet.publicnode.com",137:"https://polygon-rpc.com",204:"https://opbnb-mainnet-rpc.bnbchain.org",255:"https://api.kroma.network",300:"https://sepolia.era.zksync.dev",324:"https://mainnet.era.zksync.io",1946:"https://rpc.minato.soneium.org",2358:"https://api.sepolia.kroma.network",2741:"https://api.mainnet.abs.xyz",3939:"https://test.doschain.com",4337:"https://build.onbeam.com/rpc",5611:"https://opbnb-testnet-rpc.bnbchain.org",7979:"https://main.doschain.com",8453:"https://mainnet.base.org",11124:"https://api.testnet.abs.xyz",13337:"https://build.onbeam.com/rpc/testnet",13473:"https://rpc.testnet.immutable.com",42161:"https://arb1.arbitrum.io/rpc",42170:"https://nova.arbitrum.io/rpc",43113:"https://api.avax-test.network/ext/bc/C/rpc",43114:"https://api.avax.network/ext/bc/C/rpc",50104:"https://rpc.sophon.xyz",80002:"https://rpc-amoy.polygon.technology",84532:"https://sepolia.base.org",247253:"https://rpc-testnet.saakuru.network",421614:"https://sepolia-rollup.arbitrum.io/rpc",7225878:"https://rpc.saakuru.network",7777777:"https://rpc.zora.energy/",11155111:"https://ethereum-sepolia-rpc.publicnode.com",11155420:"https://optimism-sepolia-rpc.publicnode.com",28122024:"https://rpcv2-testnet.ancient8.gg",531050104:"https://rpc.testnet.sophon.xyz",666666666:"https://rpc.degen.tips",888888888:"https://rpc.ancient8.gg",999999999:"https://sepolia.rpc.zora.energy",85011:"https://subnets.avax.network/criminalsa/testnet/rpc"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=require("./JsonRpcError.js");exports.personalSign=async({params:
|
|
1
|
+
"use strict";var r=require("../utils/crypto.js"),e=require("./JsonRpcError.js");exports.personalSign=async({params:s,signer:o,account:n})=>{const a=s[0],t=s[1];if(!t||!a)throw new e.JsonRpcError(e.RpcErrorCode.INVALID_PARAMS,"personal_sign requires an address and a message");if(t.toLowerCase()!==n.address.toLowerCase())throw new e.JsonRpcError(e.RpcErrorCode.INVALID_PARAMS,"personal_sign requires the signer to be the from address");return await o.sign(r.hexToString(a),!1,!0)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function t(t,{dir:
|
|
1
|
+
"use strict";require("@noble/curves/secp256k1");var e=require("@noble/hashes/utils");function t(t){if(t instanceof Uint8Array)return t;const r=t.match(/^(0x|)((?:.{1,2})*)$/);if(!r)throw new Error("invalid hex string");return e.hexToBytes(r[2])}function r(e,{dir:t,size:r=32}={}){if(null===r)return e;const n=e.replace("0x","");if(n.length>2*r)throw new Error("Hex string is too long");return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}function n(e,{strict:t=!0}={}){return!!e&&("string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}function i(e){return n(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}class o extends Error{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`)}}function s(e,{size:t}){if(i(e)>t)throw new o({givenSize:i(e),maxSize:t})}function u(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)n++;return r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}exports.SizeOverflowError=o,exports.assertSize=s,exports.hexToBytes=t,exports.hexToString=function(e,r={}){let n=t(e);return r.size&&(s(n,{size:r.size}),n=u(n,{dir:"right"})),(new TextDecoder).decode(n)},exports.isHex=n,exports.numberToHex=function(e,t={}){const{size:n}=t,i=BigInt(e);let o;if(n?o=BigInt(2)**(BigInt(n)*BigInt(8))-BigInt(1):"number"==typeof e&&(o=BigInt(Number.MAX_SAFE_INTEGER)),o&&i>o||i<0){throw new Error(`Value out of bounds: ${i}${"bigint"==typeof e?"n":""}`)}const s=`0x${i.toString(16)}`;return n?r(s,{size:n}):s},exports.padHex=r,exports.sizeValue=i,exports.trim=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.VERSION="0.8.
|
|
1
|
+
"use strict";exports.VERSION="0.8.37";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={1:"https://cloudflare-eth.com",10:"https://optimism-rpc.publicnode.com",56:"https://bsc.publicnode.com",97:"https://bsc-testnet.publicnode.com",137:"https://polygon-rpc.com",204:"https://opbnb-mainnet-rpc.bnbchain.org",255:"https://api.kroma.network",300:"https://sepolia.era.zksync.dev",324:"https://mainnet.era.zksync.io",1946:"https://rpc.minato.soneium.org",2358:"https://api.sepolia.kroma.network",2741:"https://api.mainnet.abs.xyz",3939:"https://test.doschain.com",4337:"https://build.onbeam.com/rpc",5611:"https://opbnb-testnet-rpc.bnbchain.org",7979:"https://main.doschain.com",8453:"https://mainnet.base.org",11124:"https://api.testnet.abs.xyz",13337:"https://build.onbeam.com/rpc/testnet",13473:"https://rpc.testnet.immutable.com",42161:"https://arb1.arbitrum.io/rpc",42170:"https://nova.arbitrum.io/rpc",43113:"https://api.avax-test.network/ext/bc/C/rpc",43114:"https://api.avax.network/ext/bc/C/rpc",50104:"https://rpc.sophon.xyz",80002:"https://rpc-amoy.polygon.technology",84532:"https://sepolia.base.org",247253:"https://rpc-testnet.saakuru.network",421614:"https://sepolia-rollup.arbitrum.io/rpc",7225878:"https://rpc.saakuru.network",7777777:"https://rpc.zora.energy/",11155111:"https://ethereum-sepolia-rpc.publicnode.com",11155420:"https://optimism-sepolia-rpc.publicnode.com",28122024:"https://rpcv2-testnet.ancient8.gg",531050104:"https://rpc.testnet.sophon.xyz",666666666:"https://rpc.degen.tips",888888888:"https://rpc.ancient8.gg",999999999:"https://sepolia.rpc.zora.energy"};export{t as chainRpcs};
|
|
1
|
+
const t={1:"https://cloudflare-eth.com",10:"https://optimism-rpc.publicnode.com",56:"https://bsc.publicnode.com",97:"https://bsc-testnet.publicnode.com",137:"https://polygon-rpc.com",204:"https://opbnb-mainnet-rpc.bnbchain.org",255:"https://api.kroma.network",300:"https://sepolia.era.zksync.dev",324:"https://mainnet.era.zksync.io",1946:"https://rpc.minato.soneium.org",2358:"https://api.sepolia.kroma.network",2741:"https://api.mainnet.abs.xyz",3939:"https://test.doschain.com",4337:"https://build.onbeam.com/rpc",5611:"https://opbnb-testnet-rpc.bnbchain.org",7979:"https://main.doschain.com",8453:"https://mainnet.base.org",11124:"https://api.testnet.abs.xyz",13337:"https://build.onbeam.com/rpc/testnet",13473:"https://rpc.testnet.immutable.com",42161:"https://arb1.arbitrum.io/rpc",42170:"https://nova.arbitrum.io/rpc",43113:"https://api.avax-test.network/ext/bc/C/rpc",43114:"https://api.avax.network/ext/bc/C/rpc",50104:"https://rpc.sophon.xyz",80002:"https://rpc-amoy.polygon.technology",84532:"https://sepolia.base.org",247253:"https://rpc-testnet.saakuru.network",421614:"https://sepolia-rollup.arbitrum.io/rpc",7225878:"https://rpc.saakuru.network",7777777:"https://rpc.zora.energy/",11155111:"https://ethereum-sepolia-rpc.publicnode.com",11155420:"https://optimism-sepolia-rpc.publicnode.com",28122024:"https://rpcv2-testnet.ancient8.gg",531050104:"https://rpc.testnet.sophon.xyz",666666666:"https://rpc.degen.tips",888888888:"https://rpc.ancient8.gg",999999999:"https://sepolia.rpc.zora.energy",85011:"https://subnets.avax.network/criminalsa/testnet/rpc"};export{t as chainRpcs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{JsonRpcError as
|
|
1
|
+
import{hexToString as r}from"../utils/crypto.js";import{JsonRpcError as s,RpcErrorCode as e}from"./JsonRpcError.js";const o=async({params:o,signer:a,account:n})=>{const t=o[0],i=o[1];if(!i||!t)throw new s(e.INVALID_PARAMS,"personal_sign requires an address and a message");if(i.toLowerCase()!==n.address.toLowerCase())throw new s(e.INVALID_PARAMS,"personal_sign requires the signer to be the from address");return await a.sign(r(t),!1,!0)};export{o as personalSign};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@noble/curves/secp256k1";import"@noble/hashes/utils";function t(t,{dir:
|
|
1
|
+
import"@noble/curves/secp256k1";import{hexToBytes as t}from"@noble/hashes/utils";function e(e){if(e instanceof Uint8Array)return e;const n=e.match(/^(0x|)((?:.{1,2})*)$/);if(!n)throw new Error("invalid hex string");return t(n[2])}function n(t,{dir:e,size:n=32}={}){if(null===n)return t;const r=t.replace("0x","");if(r.length>2*n)throw new Error("Hex string is too long");return`0x${r["right"===e?"padEnd":"padStart"](2*n,"0")}`}function r(t,e={}){const{size:r}=e,i=BigInt(t);let o;if(r?o=BigInt(2)**(BigInt(r)*BigInt(8))-BigInt(1):"number"==typeof t&&(o=BigInt(Number.MAX_SAFE_INTEGER)),o&&i>o||i<0){throw new Error(`Value out of bounds: ${i}${"bigint"==typeof t?"n":""}`)}const s=`0x${i.toString(16)}`;return r?n(s,{size:r}):s}function i(t,{strict:e=!0}={}){return!!t&&("string"==typeof t&&(e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")))}function o(t){return i(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}class s extends Error{constructor({givenSize:t,maxSize:e}){super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`)}}function c(t,{size:e}){if(o(t)>e)throw new s({givenSize:o(t),maxSize:e})}function l(t,{dir:e="left"}={}){let n="string"==typeof t?t.replace("0x",""):t,r=0;for(let t=0;t<n.length-1&&"0"===n["left"===e?t:n.length-t-1].toString();t++)r++;return n="left"===e?n.slice(r):n.slice(0,n.length-r),"string"==typeof t?(1===n.length&&"right"===e&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function g(t,n={}){let r=e(t);return n.size&&(c(r,{size:n.size}),r=l(r,{dir:"right"})),(new TextDecoder).decode(r)}export{s as SizeOverflowError,c as assertSize,e as hexToBytes,g as hexToString,i as isHex,r as numberToHex,n as padHex,o as sizeValue,l as trim};
|
package/dist/sdk/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="0.8.
|
|
1
|
+
const o="0.8.37";export{o as VERSION};
|
package/package.json
CHANGED