@alephium/web3 3.0.0-test.4 → 3.0.0-test.6
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/index.d.ts +11 -11
- package/dist/_cjs/index.js +11 -11
- package/dist/_cjs/index.js.map +1 -1
- package/dist/_esm/address/address.d.ts +2 -2
- package/dist/_esm/address/address.js +9 -9
- package/dist/_esm/address/index.d.ts +1 -1
- package/dist/_esm/address/index.js +1 -1
- package/dist/_esm/api/api-alephium.js +1 -1
- package/dist/_esm/api/api-explorer.js +1 -1
- package/dist/_esm/api/explorer-provider.d.ts +2 -2
- package/dist/_esm/api/explorer-provider.js +2 -2
- package/dist/_esm/api/index.d.ts +6 -6
- package/dist/_esm/api/index.js +6 -6
- package/dist/_esm/api/node-provider.d.ts +4 -4
- package/dist/_esm/api/node-provider.js +4 -4
- package/dist/_esm/api/types.d.ts +1 -1
- package/dist/_esm/api/types.js +6 -6
- package/dist/_esm/api/utils.d.ts +1 -1
- package/dist/_esm/block/block.d.ts +3 -3
- package/dist/_esm/block/block.js +3 -3
- package/dist/_esm/block/index.d.ts +2 -2
- package/dist/_esm/block/index.js +1 -1
- package/dist/_esm/codec/array-codec.d.ts +2 -2
- package/dist/_esm/codec/array-codec.js +3 -3
- package/dist/_esm/codec/asset-output-codec.d.ts +6 -6
- package/dist/_esm/codec/asset-output-codec.js +10 -10
- package/dist/_esm/codec/bytestring-codec.d.ts +3 -3
- package/dist/_esm/codec/bytestring-codec.js +4 -4
- package/dist/_esm/codec/checksum-codec.d.ts +2 -2
- package/dist/_esm/codec/checksum-codec.js +4 -4
- package/dist/_esm/codec/codec.d.ts +1 -1
- package/dist/_esm/codec/codec.js +2 -2
- package/dist/_esm/codec/compact-int-codec.d.ts +2 -2
- package/dist/_esm/codec/compact-int-codec.js +2 -2
- package/dist/_esm/codec/contract-codec.d.ts +3 -3
- package/dist/_esm/codec/contract-codec.js +5 -5
- package/dist/_esm/codec/contract-output-codec.d.ts +4 -4
- package/dist/_esm/codec/contract-output-codec.js +8 -8
- package/dist/_esm/codec/contract-output-ref-codec.d.ts +2 -2
- package/dist/_esm/codec/contract-output-ref-codec.js +3 -3
- package/dist/_esm/codec/either-codec.d.ts +1 -1
- package/dist/_esm/codec/either-codec.js +1 -1
- package/dist/_esm/codec/index.d.ts +24 -24
- package/dist/_esm/codec/index.js +24 -24
- package/dist/_esm/codec/input-codec.d.ts +4 -4
- package/dist/_esm/codec/input-codec.js +5 -5
- package/dist/_esm/codec/instr-codec.d.ts +5 -5
- package/dist/_esm/codec/instr-codec.js +6 -6
- package/dist/_esm/codec/int-as-4bytes-codec.d.ts +2 -2
- package/dist/_esm/codec/int-as-4bytes-codec.js +1 -1
- package/dist/_esm/codec/lockup-script-codec.d.ts +4 -4
- package/dist/_esm/codec/lockup-script-codec.js +5 -5
- package/dist/_esm/codec/method-codec.d.ts +4 -4
- package/dist/_esm/codec/method-codec.js +5 -5
- package/dist/_esm/codec/option-codec.d.ts +1 -1
- package/dist/_esm/codec/option-codec.js +1 -1
- package/dist/_esm/codec/output-codec.d.ts +5 -5
- package/dist/_esm/codec/output-codec.js +4 -4
- package/dist/_esm/codec/public-key-like-codec.d.ts +2 -2
- package/dist/_esm/codec/public-key-like-codec.js +2 -2
- package/dist/_esm/codec/script-codec.d.ts +4 -4
- package/dist/_esm/codec/script-codec.js +3 -3
- package/dist/_esm/codec/signature-codec.d.ts +2 -2
- package/dist/_esm/codec/signature-codec.js +2 -2
- package/dist/_esm/codec/timestamp-codec.d.ts +2 -2
- package/dist/_esm/codec/timestamp-codec.js +2 -2
- package/dist/_esm/codec/token-codec.d.ts +2 -2
- package/dist/_esm/codec/token-codec.js +3 -3
- package/dist/_esm/codec/transaction-codec.d.ts +6 -6
- package/dist/_esm/codec/transaction-codec.js +8 -8
- package/dist/_esm/codec/unlock-script-codec.d.ts +4 -4
- package/dist/_esm/codec/unlock-script-codec.js +6 -6
- package/dist/_esm/codec/unsigned-tx-codec.d.ts +6 -6
- package/dist/_esm/codec/unsigned-tx-codec.js +7 -7
- package/dist/_esm/codec/val.d.ts +4 -4
- package/dist/_esm/codec/val.js +5 -5
- package/dist/_esm/contract/contract.d.ts +6 -6
- package/dist/_esm/contract/contract.js +10 -10
- package/dist/_esm/contract/dapp-tx-builder.d.ts +4 -4
- package/dist/_esm/contract/dapp-tx-builder.js +7 -7
- package/dist/_esm/contract/deployment.d.ts +2 -2
- package/dist/_esm/contract/events.d.ts +2 -2
- package/dist/_esm/contract/events.js +2 -2
- package/dist/_esm/contract/index.d.ts +6 -6
- package/dist/_esm/contract/index.js +6 -6
- package/dist/_esm/contract/ralph.d.ts +3 -3
- package/dist/_esm/contract/ralph.js +6 -6
- package/dist/_esm/contract/script-simulator.d.ts +4 -4
- package/dist/_esm/contract/script-simulator.js +5 -5
- package/dist/_esm/exchange/exchange.d.ts +3 -3
- package/dist/_esm/exchange/exchange.js +5 -5
- package/dist/_esm/exchange/index.d.ts +2 -2
- package/dist/_esm/exchange/index.js +1 -1
- package/dist/_esm/global.d.ts +2 -2
- package/dist/_esm/global.js +1 -1
- package/dist/_esm/index.d.ts +15 -15
- package/dist/_esm/index.js +15 -15
- package/dist/_esm/index.js.map +1 -1
- package/dist/_esm/signer/index.d.ts +3 -3
- package/dist/_esm/signer/index.js +3 -3
- package/dist/_esm/signer/signer.d.ts +3 -3
- package/dist/_esm/signer/signer.js +5 -5
- package/dist/_esm/signer/tx-builder.d.ts +2 -2
- package/dist/_esm/signer/tx-builder.js +10 -10
- package/dist/_esm/signer/types.d.ts +4 -4
- package/dist/_esm/signer/types.js +1 -1
- package/dist/_esm/token/index.d.ts +1 -1
- package/dist/_esm/token/index.js +1 -1
- package/dist/_esm/token/nft.d.ts +1 -1
- package/dist/_esm/token/nft.js +1 -1
- package/dist/_esm/transaction/index.d.ts +3 -3
- package/dist/_esm/transaction/index.js +3 -3
- package/dist/_esm/transaction/sign-verify.d.ts +1 -1
- package/dist/_esm/transaction/sign-verify.js +1 -1
- package/dist/_esm/transaction/status.d.ts +2 -2
- package/dist/_esm/transaction/status.js +2 -2
- package/dist/_esm/transaction/utils.d.ts +2 -2
- package/dist/_esm/transaction/utils.js +4 -4
- package/dist/_esm/utils/bs58.js +1 -1
- package/dist/_esm/utils/index.d.ts +7 -7
- package/dist/_esm/utils/index.js +7 -7
- package/dist/_esm/utils/number.d.ts +1 -1
- package/dist/_esm/utils/sign.d.ts +1 -1
- package/dist/_esm/utils/sign.js +1 -1
- package/dist/_esm/utils/utils.js +1 -1
- package/package.json +3 -2
- package/src/index.ts +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HexString } from '../utils';
|
|
2
|
-
import { Transaction } from '../api/api-alephium';
|
|
3
|
-
import { Address } from '../signer';
|
|
1
|
+
import { HexString } from '../utils/index.js';
|
|
2
|
+
import { Transaction } from '../api/api-alephium.js';
|
|
3
|
+
import { Address } from '../signer/index.js';
|
|
4
4
|
export declare function validateExchangeAddress(address: string): void;
|
|
5
5
|
export declare function isALPHTransferTx(tx: Transaction): boolean;
|
|
6
6
|
export interface BaseDepositInfo {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AddressType, addressFromPublicKey, addressFromScript } from '../address';
|
|
2
|
-
import { base58ToBytes, binToHex, hexToBinUnsafe, isHexString } from '../utils';
|
|
3
|
-
import { encodedSameAsPrevious, unlockScriptCodec } from '../codec/unlock-script-codec';
|
|
4
|
-
import { scriptCodec } from '../codec/script-codec';
|
|
5
|
-
import { TraceableError } from '../error';
|
|
1
|
+
import { AddressType, addressFromPublicKey, addressFromScript } from '../address/index.js';
|
|
2
|
+
import { base58ToBytes, binToHex, hexToBinUnsafe, isHexString } from '../utils/index.js';
|
|
3
|
+
import { encodedSameAsPrevious, unlockScriptCodec } from '../codec/unlock-script-codec.js';
|
|
4
|
+
import { scriptCodec } from '../codec/script-codec.js';
|
|
5
|
+
import { TraceableError } from '../error.js';
|
|
6
6
|
export function validateExchangeAddress(address) {
|
|
7
7
|
const decoded = base58ToBytes(address);
|
|
8
8
|
if (decoded.length === 0)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { validateExchangeAddress, getSenderAddress, isALPHTransferTx, getALPHDepositInfo, getDepositInfo } from './exchange';
|
|
2
|
-
export type { BaseDepositInfo, TokenDepositInfo, DepositInfo } from './exchange';
|
|
1
|
+
export { validateExchangeAddress, getSenderAddress, isALPHTransferTx, getALPHDepositInfo, getDepositInfo } from './exchange.js';
|
|
2
|
+
export type { BaseDepositInfo, TokenDepositInfo, DepositInfo } from './exchange.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { validateExchangeAddress, getSenderAddress, isALPHTransferTx, getALPHDepositInfo, getDepositInfo } from './exchange';
|
|
1
|
+
export { validateExchangeAddress, getSenderAddress, isALPHTransferTx, getALPHDepositInfo, getDepositInfo } from './exchange.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/_esm/global.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExplorerProvider, NodeProvider } from './api';
|
|
2
|
-
import { NetworkId } from './utils';
|
|
1
|
+
import { ExplorerProvider, NodeProvider } from './api/index.js';
|
|
2
|
+
import { NetworkId } from './utils/index.js';
|
|
3
3
|
export declare function setCurrentNodeProvider(provider: NodeProvider): void;
|
|
4
4
|
export declare function setCurrentNodeProvider(baseUrl: string, apiKey?: string, customFetch?: typeof fetch): void;
|
|
5
5
|
export declare function getCurrentNodeProvider(): NodeProvider;
|
package/dist/_esm/global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExplorerProvider, NodeProvider } from './api';
|
|
1
|
+
import { ExplorerProvider, NodeProvider } from './api/index.js';
|
|
2
2
|
let _currentNodeProvider = undefined;
|
|
3
3
|
export function setCurrentNodeProvider(provider, apiKey, customFetch) {
|
|
4
4
|
if (typeof provider == 'string') {
|
package/dist/_esm/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from './api/index';
|
|
2
|
-
export * from './contract/index';
|
|
3
|
-
export * from './signer/index';
|
|
4
|
-
export * from './utils/index';
|
|
5
|
-
export * from './transaction/index';
|
|
6
|
-
export * from './token/index';
|
|
7
|
-
export * from './constants';
|
|
8
|
-
export * as web3 from './global';
|
|
9
|
-
export * as codec from './codec/index';
|
|
10
|
-
export * as utils from './utils/index';
|
|
11
|
-
export * from './debug';
|
|
12
|
-
export * from './block/index';
|
|
13
|
-
export * from './address/index';
|
|
14
|
-
export * from './exchange/index';
|
|
15
|
-
export * from './error';
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export * from './contract/index.js';
|
|
3
|
+
export * from './signer/index.js';
|
|
4
|
+
export * from './utils/index.js';
|
|
5
|
+
export * from './transaction/index.js';
|
|
6
|
+
export * from './token/index.js';
|
|
7
|
+
export * from './constants.js';
|
|
8
|
+
export * as web3 from './global.js';
|
|
9
|
+
export * as codec from './codec/index.js';
|
|
10
|
+
export * as utils from './utils/index.js';
|
|
11
|
+
export * from './debug.js';
|
|
12
|
+
export * from './block/index.js';
|
|
13
|
+
export * from './address/index.js';
|
|
14
|
+
export * from './exchange/index.js';
|
|
15
|
+
export * from './error.js';
|
package/dist/_esm/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from './api/index';
|
|
2
|
-
export * from './contract/index';
|
|
3
|
-
export * from './signer/index';
|
|
4
|
-
export * from './utils/index';
|
|
5
|
-
export * from './transaction/index';
|
|
6
|
-
export * from './token/index';
|
|
7
|
-
export * from './constants';
|
|
8
|
-
export * as web3 from './global';
|
|
9
|
-
export * as codec from './codec/index';
|
|
10
|
-
export * as utils from './utils/index';
|
|
11
|
-
export * from './debug';
|
|
12
|
-
export * from './block/index';
|
|
13
|
-
export * from './address/index';
|
|
14
|
-
export * from './exchange/index';
|
|
15
|
-
export * from './error';
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export * from './contract/index.js';
|
|
3
|
+
export * from './signer/index.js';
|
|
4
|
+
export * from './utils/index.js';
|
|
5
|
+
export * from './transaction/index.js';
|
|
6
|
+
export * from './token/index.js';
|
|
7
|
+
export * from './constants.js';
|
|
8
|
+
export * as web3 from './global.js';
|
|
9
|
+
export * as codec from './codec/index.js';
|
|
10
|
+
export * as utils from './utils/index.js';
|
|
11
|
+
export * from './debug.js';
|
|
12
|
+
export * from './block/index.js';
|
|
13
|
+
export * from './address/index.js';
|
|
14
|
+
export * from './exchange/index.js';
|
|
15
|
+
export * from './error.js';
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
package/dist/_esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AAEvB,cAAc,aAAa,CAAA;AAC3B,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './signer';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './tx-builder';
|
|
1
|
+
export * from './signer.js';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './tx-builder.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './signer';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './tx-builder';
|
|
1
|
+
export * from './signer.js';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './tx-builder.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExplorerProvider, NodeProvider } from '../api';
|
|
2
|
-
import { node } from '../api';
|
|
3
|
-
import { Account, EnableOptionsBase, Destination, SignDeployContractTxParams, SignDeployContractTxResult, SignExecuteScriptTxParams, SignExecuteScriptTxResult, SignMessageParams, SignMessageResult, SignTransferTxParams, SignTransferTxResult, SignUnsignedTxParams, SignUnsignedTxResult, SubmissionResult, SubmitTransactionParams, KeyType, MessageHasher, SignChainedTxParams, SignChainedTxResult, BuildTxResult, SignTxResult } from './types';
|
|
1
|
+
import { ExplorerProvider, NodeProvider } from '../api/index.js';
|
|
2
|
+
import { node } from '../api/index.js';
|
|
3
|
+
import { Account, EnableOptionsBase, Destination, SignDeployContractTxParams, SignDeployContractTxResult, SignExecuteScriptTxParams, SignExecuteScriptTxResult, SignMessageParams, SignMessageResult, SignTransferTxParams, SignTransferTxResult, SignUnsignedTxParams, SignUnsignedTxResult, SubmissionResult, SubmitTransactionParams, KeyType, MessageHasher, SignChainedTxParams, SignChainedTxResult, BuildTxResult, SignTxResult } from './types.js';
|
|
4
4
|
export declare abstract class SignerProvider {
|
|
5
5
|
abstract get nodeProvider(): NodeProvider | undefined;
|
|
6
6
|
abstract get explorerProvider(): ExplorerProvider | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { fromApiNumber256, fromApiTokens, stringify, toApiNumber256, toApiTokens } from '../api';
|
|
1
|
+
import { fromApiNumber256, fromApiTokens, stringify, toApiNumber256, toApiTokens } from '../api/index.js';
|
|
2
2
|
import { blake2b } from '@noble/hashes/blake2b';
|
|
3
3
|
import { sha256 } from '@noble/hashes/sha256';
|
|
4
|
-
import { isGroupedAccount } from './types';
|
|
5
|
-
import { TransactionBuilder } from './tx-builder';
|
|
6
|
-
import { addressFromPublicKey, groupOfAddress } from '../address';
|
|
7
|
-
import { binToHex, verifySignature } from '../utils';
|
|
4
|
+
import { isGroupedAccount } from './types.js';
|
|
5
|
+
import { TransactionBuilder } from './tx-builder.js';
|
|
6
|
+
import { addressFromPublicKey, groupOfAddress } from '../address/index.js';
|
|
7
|
+
import { binToHex, verifySignature } from '../utils/index.js';
|
|
8
8
|
export class SignerProvider {
|
|
9
9
|
async getSelectedAccount() {
|
|
10
10
|
const account = await this.unsafeGetSelectedAccount();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeProvider } from '../api';
|
|
2
|
-
import { SignChainedTxParams, SignChainedTxResult, SignDeployContractTxParams, SignDeployContractTxResult, SignExecuteScriptTxParams, SignExecuteScriptTxResult, SignTransferTxParams, SignTransferTxResult, SignUnsignedTxParams, SignUnsignedTxResult, BuildTxResult } from './types';
|
|
1
|
+
import { NodeProvider } from '../api/index.js';
|
|
2
|
+
import { SignChainedTxParams, SignChainedTxResult, SignDeployContractTxParams, SignDeployContractTxResult, SignExecuteScriptTxParams, SignExecuteScriptTxResult, SignTransferTxParams, SignTransferTxResult, SignUnsignedTxParams, SignUnsignedTxResult, BuildTxResult } from './types.js';
|
|
3
3
|
export declare abstract class TransactionBuilder {
|
|
4
4
|
abstract get nodeProvider(): NodeProvider;
|
|
5
5
|
static from(nodeProvider: NodeProvider): TransactionBuilder;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { binToHex, hexToBinUnsafe } from '../utils';
|
|
2
|
-
import { fromApiNumber256, NodeProvider, toApiNumber256Optional, toApiTokens } from '../api';
|
|
3
|
-
import { addressFromPublicKey, contractIdFromAddress, groupOfAddress, isGrouplessAddress } from '../address';
|
|
4
|
-
import { toApiDestinations } from './signer';
|
|
5
|
-
import { isGroupedKeyType } from './types';
|
|
6
|
-
import { unsignedTxCodec } from '../codec';
|
|
7
|
-
import { groupIndexOfTransaction } from '../transaction';
|
|
8
|
-
import { blakeHash } from '../codec/hash';
|
|
9
|
-
import { TOTAL_NUMBER_OF_GROUPS } from '../constants';
|
|
10
|
-
import { scriptCodec } from '../codec/script-codec';
|
|
1
|
+
import { binToHex, hexToBinUnsafe } from '../utils/index.js';
|
|
2
|
+
import { fromApiNumber256, NodeProvider, toApiNumber256Optional, toApiTokens } from '../api/index.js';
|
|
3
|
+
import { addressFromPublicKey, contractIdFromAddress, groupOfAddress, isGrouplessAddress } from '../address/index.js';
|
|
4
|
+
import { toApiDestinations } from './signer.js';
|
|
5
|
+
import { isGroupedKeyType } from './types.js';
|
|
6
|
+
import { unsignedTxCodec } from '../codec/index.js';
|
|
7
|
+
import { groupIndexOfTransaction } from '../transaction/index.js';
|
|
8
|
+
import { blakeHash } from '../codec/hash.js';
|
|
9
|
+
import { TOTAL_NUMBER_OF_GROUPS } from '../constants.js';
|
|
10
|
+
import { scriptCodec } from '../codec/script-codec.js';
|
|
11
11
|
export class TransactionBuilder {
|
|
12
12
|
static from(param0, param1, customFetch) {
|
|
13
13
|
const nodeProvider = typeof param0 === 'string' ? new NodeProvider(param0, param1, customFetch) : param0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Number256, Token } from '../api';
|
|
2
|
-
import { node } from '../api';
|
|
3
|
-
import { SimulationResult } from '../api/api-alephium';
|
|
4
|
-
import { NetworkId } from '../utils';
|
|
1
|
+
import { Number256, Token } from '../api/index.js';
|
|
2
|
+
import { node } from '../api/index.js';
|
|
3
|
+
import { SimulationResult } from '../api/api-alephium.js';
|
|
4
|
+
import { NetworkId } from '../utils/index.js';
|
|
5
5
|
export type Address = string;
|
|
6
6
|
export type OutputRef = node.OutputRef;
|
|
7
7
|
export interface Destination {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './nft';
|
|
1
|
+
export * from './nft.js';
|
package/dist/_esm/token/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './nft';
|
|
1
|
+
export * from './nft.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/_esm/token/nft.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NFTCollectionUriMetaData, NFTTokenUriMetaData } from '../api';
|
|
1
|
+
import { NFTCollectionUriMetaData, NFTTokenUriMetaData } from '../api/index.js';
|
|
2
2
|
export declare const validNFTTokenUriMetaDataFields: string[];
|
|
3
3
|
export declare const validNFTTokenUriMetaDataAttributesFields: string[];
|
|
4
4
|
export declare const validNFTUriMetaDataAttributeTypes: string[];
|
package/dist/_esm/token/nft.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TraceableError } from '../error';
|
|
1
|
+
import { TraceableError } from '../error.js';
|
|
2
2
|
export const validNFTTokenUriMetaDataFields = ['name', 'description', 'image', 'attributes'];
|
|
3
3
|
export const validNFTTokenUriMetaDataAttributesFields = ['trait_type', 'value'];
|
|
4
4
|
export const validNFTUriMetaDataAttributeTypes = ['string', 'number', 'boolean'];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './status';
|
|
2
|
-
export * from './sign-verify';
|
|
3
|
-
export * from './utils';
|
|
1
|
+
export * from './status.js';
|
|
2
|
+
export * from './sign-verify.js';
|
|
3
|
+
export * from './utils.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './status';
|
|
2
|
-
export * from './sign-verify';
|
|
3
|
-
export * from './utils';
|
|
1
|
+
export * from './status.js';
|
|
2
|
+
export * from './sign-verify.js';
|
|
3
|
+
export * from './utils.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { KeyType } from '../signer';
|
|
1
|
+
import { KeyType } from '../signer/index.js';
|
|
2
2
|
export declare function transactionSign(txId: string, privateKey: string, keyType?: KeyType): string;
|
|
3
3
|
export declare function transactionVerifySignature(txId: string, publicKey: string, signature: string, keyType?: KeyType): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { node } from '../api';
|
|
2
|
-
import { Subscription, SubscribeOptions } from '../utils';
|
|
1
|
+
import { node } from '../api/index.js';
|
|
2
|
+
import { Subscription, SubscribeOptions } from '../utils/index.js';
|
|
3
3
|
export type TxStatus = node.TxStatus;
|
|
4
4
|
export declare class TxStatusSubscription extends Subscription<TxStatus> {
|
|
5
5
|
readonly txId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as web3 from '../global';
|
|
2
|
-
import { Subscription } from '../utils';
|
|
1
|
+
import * as web3 from '../global.js';
|
|
2
|
+
import { Subscription } from '../utils/index.js';
|
|
3
3
|
export class TxStatusSubscription extends Subscription {
|
|
4
4
|
constructor(options, txId, fromGroup, toGroup, confirmations) {
|
|
5
5
|
super(options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { node } from '../api';
|
|
2
|
-
import { UnsignedTx } from '../codec';
|
|
1
|
+
import { node } from '../api/index.js';
|
|
2
|
+
import { UnsignedTx } from '../codec/index.js';
|
|
3
3
|
export declare function waitForTxConfirmation(txId: string, confirmations: number, requestInterval: number): Promise<node.Confirmed>;
|
|
4
4
|
export declare function groupIndexOfTransaction(unsignedTx: UnsignedTx): [number, number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { groupOfLockupScript } from '../address';
|
|
2
|
-
import { TOTAL_NUMBER_OF_GROUPS } from '../constants';
|
|
3
|
-
import { getCurrentNodeProvider } from '../global';
|
|
4
|
-
import { xorByte } from '../utils';
|
|
1
|
+
import { groupOfLockupScript } from '../address/index.js';
|
|
2
|
+
import { TOTAL_NUMBER_OF_GROUPS } from '../constants.js';
|
|
3
|
+
import { getCurrentNodeProvider } from '../global.js';
|
|
4
|
+
import { xorByte } from '../utils/index.js';
|
|
5
5
|
function isConfirmed(txStatus) {
|
|
6
6
|
return txStatus.type === 'Confirmed';
|
|
7
7
|
}
|
package/dist/_esm/utils/bs58.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import basex from 'base-x';
|
|
2
|
-
import { TraceableError } from '../error';
|
|
2
|
+
import { TraceableError } from '../error.js';
|
|
3
3
|
const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
4
4
|
export const bs58 = basex(ALPHABET);
|
|
5
5
|
export function isBase58(s) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './webcrypto';
|
|
2
|
-
export * from './bs58';
|
|
3
|
-
export * from './djb2';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
export * from './subscription';
|
|
6
|
-
export * from './sign';
|
|
7
|
-
export * from './number';
|
|
1
|
+
export * from './webcrypto.js';
|
|
2
|
+
export * from './bs58.js';
|
|
3
|
+
export * from './djb2.js';
|
|
4
|
+
export * from './utils.js';
|
|
5
|
+
export * from './subscription.js';
|
|
6
|
+
export * from './sign.js';
|
|
7
|
+
export * from './number.js';
|
package/dist/_esm/utils/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './webcrypto';
|
|
2
|
-
export * from './bs58';
|
|
3
|
-
export * from './djb2';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
export * from './subscription';
|
|
6
|
-
export * from './sign';
|
|
7
|
-
export * from './number';
|
|
1
|
+
export * from './webcrypto.js';
|
|
2
|
+
export * from './bs58.js';
|
|
3
|
+
export * from './djb2.js';
|
|
4
|
+
export * from './utils.js';
|
|
5
|
+
export * from './subscription.js';
|
|
6
|
+
export * from './sign.js';
|
|
7
|
+
export * from './number.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { KeyType } from '../signer';
|
|
1
|
+
import { KeyType } from '../signer/index.js';
|
|
2
2
|
export declare function sign(hash: string, privateKey: string, _keyType?: KeyType): string;
|
|
3
3
|
export declare function verifySignature(hash: string, publicKey: string, signature: string, _keyType?: KeyType): boolean;
|
package/dist/_esm/utils/sign.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { binToHex, encodeSignature, hexToBinUnsafe, signatureDecode } from '../utils';
|
|
1
|
+
import { binToHex, encodeSignature, hexToBinUnsafe, signatureDecode } from '../utils/index.js';
|
|
2
2
|
import * as secp from '@noble/secp256k1';
|
|
3
3
|
import { sha256 } from '@noble/hashes/sha256';
|
|
4
4
|
import { hmac } from '@noble/hashes/hmac';
|
package/dist/_esm/utils/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as secp256k1 from '@noble/secp256k1';
|
|
2
2
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
3
|
-
import { TOTAL_NUMBER_OF_GROUPS, TOTAL_NUMBER_OF_CHAINS } from '../constants';
|
|
3
|
+
import { TOTAL_NUMBER_OF_GROUPS, TOTAL_NUMBER_OF_CHAINS } from '../constants.js';
|
|
4
4
|
export const binToHex = bytesToHex;
|
|
5
5
|
export const networkIds = ['mainnet', 'testnet', 'devnet'];
|
|
6
6
|
export function encodeSignature(signature) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "3.0.0-test.
|
|
3
|
+
"version": "3.0.0-test.6",
|
|
4
4
|
"description": "A JS/TS library to interact with the Alephium platform",
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"swagger-typescript-api": "12.0.3",
|
|
103
103
|
"ts-jest": "^28.0.8",
|
|
104
104
|
"ts-node": "^10.9.1",
|
|
105
|
+
"tsc-alias": "^1.8.16",
|
|
105
106
|
"tslib": "^2.5.0",
|
|
106
107
|
"typescript": "^5.9.3"
|
|
107
108
|
},
|
|
@@ -113,7 +114,7 @@
|
|
|
113
114
|
"clean": "rm -rf node_modules dist",
|
|
114
115
|
"build": "rm -rf dist && pnpm build:cjs && pnpm build:esm",
|
|
115
116
|
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node --outDir dist/_cjs --declaration --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > dist/_cjs/package.json",
|
|
116
|
-
"build:esm": "tsc --project tsconfig.build.json --outDir dist/_esm --declaration && printf '{\"type\":\"module\",\"sideEffects\":false}' > dist/_esm/package.json",
|
|
117
|
+
"build:esm": "tsc --project tsconfig.build.json --outDir dist/_esm --declaration && tsc-alias --project tsconfig.build.json --outDir dist/_esm --resolve-full-paths && printf '{\"type\":\"module\",\"sideEffects\":false}' > dist/_esm/package.json",
|
|
117
118
|
"check": "publint && attw --pack --ignore-rules internal-resolution-error",
|
|
118
119
|
"test": "jest -i --config ./jest-config.json",
|
|
119
120
|
"update-schemas": "npm run update-schema:alephium && npm run update-schema:explorer",
|
package/src/index.ts
CHANGED
|
@@ -16,19 +16,19 @@ You should have received a copy of the GNU Lesser General Public License
|
|
|
16
16
|
along with the library. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
export * from './api
|
|
20
|
-
export * from './contract
|
|
21
|
-
export * from './signer
|
|
22
|
-
export * from './utils
|
|
23
|
-
export * from './transaction
|
|
24
|
-
export * from './token
|
|
19
|
+
export * from './api'
|
|
20
|
+
export * from './contract'
|
|
21
|
+
export * from './signer'
|
|
22
|
+
export * from './utils'
|
|
23
|
+
export * from './transaction'
|
|
24
|
+
export * from './token'
|
|
25
25
|
|
|
26
26
|
export * from './constants'
|
|
27
27
|
export * as web3 from './global'
|
|
28
|
-
export * as codec from './codec
|
|
29
|
-
export * as utils from './utils
|
|
28
|
+
export * as codec from './codec'
|
|
29
|
+
export * as utils from './utils'
|
|
30
30
|
export * from './debug'
|
|
31
|
-
export * from './block
|
|
32
|
-
export * from './address
|
|
33
|
-
export * from './exchange
|
|
31
|
+
export * from './block'
|
|
32
|
+
export * from './address'
|
|
33
|
+
export * from './exchange'
|
|
34
34
|
export * from './error'
|