@fuel-ts/interfaces
Advanced tools
Comparing version 0.0.0-master-9640d58 to 0.0.0-master-9a4e62cc
@@ -1,14 +0,20 @@ | ||
import type { BytesLike } from '@ethersproject/bytes'; | ||
export declare type Address = string; | ||
export declare type ContractId = string; | ||
export declare abstract class AbstractContract { | ||
import { BytesLike } from '@ethersproject/bytes'; | ||
declare type Address = string; | ||
declare type ContractId = string; | ||
declare abstract class AbstractScript<T> { | ||
abstract bytes: Uint8Array; | ||
abstract encodeScriptData: (data: T) => Uint8Array; | ||
} | ||
declare abstract class AbstractContract { | ||
abstract id: ContractId; | ||
} | ||
export declare abstract class AbstractWallet { | ||
declare abstract class AbstractWallet { | ||
abstract address: string; | ||
} | ||
export declare type AddressLike = Address | BytesLike | AbstractWallet; | ||
export declare const addressify: (addressLike: AddressLike) => Address; | ||
export declare type ContractIdLike = ContractId | BytesLike | AbstractContract; | ||
export declare const contractIdify: (contractIdLike: ContractIdLike) => ContractId; | ||
//# sourceMappingURL=index.d.ts.map | ||
declare type AddressLike = Address | BytesLike | AbstractWallet; | ||
declare const addressify: (addressLike: AddressLike) => Address; | ||
declare type ContractIdLike = ContractId | BytesLike | AbstractContract; | ||
declare const contractIdify: (contractIdLike: ContractIdLike) => ContractId; | ||
export { AbstractContract, AbstractScript, AbstractWallet, Address, AddressLike, ContractId, ContractIdLike, addressify, contractIdify }; |
@@ -1,25 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.contractIdify = exports.addressify = exports.AbstractWallet = exports.AbstractContract = void 0; | ||
/* eslint-disable max-classes-per-file */ | ||
const bytes_1 = require("@ethersproject/bytes"); | ||
class AbstractContract { | ||
} | ||
exports.AbstractContract = AbstractContract; | ||
class AbstractWallet { | ||
} | ||
exports.AbstractWallet = AbstractWallet; | ||
const addressify = (addressLike) => { | ||
if (addressLike instanceof AbstractWallet) { | ||
return addressLike.address; | ||
} | ||
return (0, bytes_1.hexlify)(addressLike); | ||
}; | ||
exports.addressify = addressify; | ||
const contractIdify = (contractIdLike) => { | ||
if (contractIdLike instanceof AbstractContract) { | ||
return contractIdLike.id; | ||
} | ||
return (0, bytes_1.hexlify)(contractIdLike); | ||
}; | ||
exports.contractIdify = contractIdify; | ||
var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var f=(t,r)=>{for(var s in r)d(t,s,{get:r[s],enumerable:!0})},b=(t,r,s,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of y(r))!x.call(t,e)&&e!==s&&d(t,e,{get:()=>r[e],enumerable:!(i=p(r,e))||i.enumerable});return t};var A=t=>b(d({},"__esModule",{value:!0}),t);var l={};f(l,{AbstractContract:()=>a,AbstractScript:()=>n,AbstractWallet:()=>o,addressify:()=>C,contractIdify:()=>I});module.exports=A(l);var c=require("@ethersproject/bytes"),n=class{},a=class{},o=class{},C=t=>t instanceof o?t.address:(0,c.hexlify)(t),I=t=>t instanceof a?t.id:(0,c.hexlify)(t);0&&(module.exports={AbstractContract,AbstractScript,AbstractWallet,addressify,contractIdify}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@fuel-ts/interfaces", | ||
"version": "0.0.0-master-9640d58", | ||
"version": "0.0.0-master-9a4e62cc", | ||
"description": "", | ||
@@ -8,2 +8,11 @@ "author": "Fuel Labs <contact@fuel.sh> (https://fuel.network/)", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"typings": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"default": "./dist/index.mjs" | ||
} | ||
}, | ||
"files": [ | ||
@@ -14,6 +23,7 @@ "dist" | ||
"dependencies": { | ||
"@ethersproject/bignumber": "^5.6.0", | ||
"@ethersproject/bytes": "^5.6.0" | ||
}, | ||
"gitHead": "0e1ad18243bd07a674dc87c78303b28a9a5a7ae2" | ||
} | ||
"scripts": { | ||
"build": "tsup --dts" | ||
} | ||
} |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
31254
1
10
46
0
52
3
- Removed@ethersproject/bignumber@^5.6.0
- Removed@ethersproject/bignumber@5.7.0(transitive)
- Removedbn.js@5.2.1(transitive)