Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caip

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caip - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

dist/cjs/account.d.ts

6

dist/cjs/index.d.ts

@@ -1,5 +0,3 @@

export declare class ChainID {
}
export declare class AccountID {
}
export * from "./account";
export * from "./chain";
//# sourceMappingURL=index.d.ts.map
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
class ChainID {
}
exports.ChainID = ChainID;
class AccountID {
}
exports.AccountID = AccountID;
__export(require("./account"));
__export(require("./chain"));
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CAIP",[],t):"object"==typeof exports?exports.CAIP=t():e.CAIP=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ChainID=class{};t.AccountID=class{}}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CAIP",[],t):"object"==typeof exports?exports.CAIP=t():e.CAIP=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.namespace=e.namespace,this.reference=e.reference}static isValid(e){return e.includes(this.delimiter)}static parse(e){if(!n.isValid(e))throw new Error("Invalid chainId provided: "+e);const t=e.split(this.delimiter);return new n({namespace:t[1],reference:t[0]})}static format(e){return e.reference+this.delimiter+e.namespace}toString(){return n.format(this.toJson())}toJson(){return{namespace:this.namespace,reference:this.reference}}}t.ChainID=n,n.standard="caip-2",n.delimiter=";"},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(2)),n(r(0))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0);class i{constructor(e){this.chainId=n.ChainID.parse(e.chainId),this.address=e.address}static isValid(e){return e.includes(this.delimiter)}static parse(e){if(!i.isValid(e))throw new Error("Invalid accountId provided: "+e);const t=e.split(this.delimiter);return new i({chainId:t[1],address:t[0]})}static format(e){return e.address+this.delimiter+e.chainId}toString(){return i.format(this.toJson())}toJson(){return{chainId:this.chainId.toString(),address:this.address}}}t.AccountID=i,i.standard="caip-10",i.delimiter="@"}])}));
{
"name": "caip",
"description": "CAIP standard utils",
"version": "0.1.0",
"version": "0.2.0",
"author": "Pedro Gomes <github.com/pedrouid>",

@@ -60,5 +60,5 @@ "license": "MIT",

"semi": true,
"singleQuote": true,
"singleQuote": false,
"trailingComma": "es5"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc