@kynesyslabs/demosdk 2.3.19 → 2.3.20
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/build/types/blockchain/Transaction.d.ts +4 -3
- package/build/types/blockchain/Transaction.js.map +1 -1
- package/build/types/blockchain/TransactionSubtypes/ContractCallTransaction.d.ts +24 -0
- package/build/types/blockchain/TransactionSubtypes/{SmartContractTransaction.js → ContractCallTransaction.js} +1 -1
- package/build/types/blockchain/TransactionSubtypes/ContractCallTransaction.js.map +1 -0
- package/build/types/blockchain/TransactionSubtypes/ContractDeployTransaction.d.ts +31 -0
- package/build/types/blockchain/TransactionSubtypes/ContractDeployTransaction.js +3 -0
- package/build/types/blockchain/TransactionSubtypes/ContractDeployTransaction.js.map +1 -0
- package/build/types/blockchain/TransactionSubtypes/index.d.ts +5 -1
- package/build/types/blockchain/TransactionSubtypes/index.js +2 -0
- package/build/types/blockchain/TransactionSubtypes/index.js.map +1 -1
- package/package.json +1 -1
- package/build/types/blockchain/TransactionSubtypes/SmartContractTransaction.d.ts +0 -9
- package/build/types/blockchain/TransactionSubtypes/SmartContractTransaction.js.map +0 -1
|
@@ -11,10 +11,11 @@ import { BridgeOperationCompiled } from "../../bridge/nativeBridgeTypes";
|
|
|
11
11
|
import { L2PSEncryptedPayload } from "../../l2ps";
|
|
12
12
|
import { StoragePayload } from "./TransactionSubtypes/StorageTransaction";
|
|
13
13
|
import { L2PSHashPayload } from "./TransactionSubtypes/L2PSHashTransaction";
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import { ContractDeployPayload } from "./TransactionSubtypes/ContractDeployTransaction";
|
|
15
|
+
import { ContractCallPayload } from "./TransactionSubtypes/ContractCallTransaction";
|
|
16
|
+
export type TransactionContentData = ["web2Request", IWeb2Payload] | ["crosschainOperation", XMScript] | ["native", INativePayload] | ["demoswork", DemoScript] | ["l2psEncryptedTx", L2PSEncryptedPayload] | ["identity", IdentityPayload] | ["instantMessaging", InstantMessagingPayload] | ["nativeBridge", BridgeOperationCompiled] | ["storage", StoragePayload] | ["l2ps_hash_update", L2PSHashPayload] | ["contractDeploy", ContractDeployPayload] | ["contractCall", ContractCallPayload];
|
|
16
17
|
export interface TransactionContent {
|
|
17
|
-
type: "web2Request" | "crosschainOperation" | "subnet" | "native" | "demoswork" | "genesis" | "NODE_ONLINE" | "identity" | "instantMessaging" | "nativeBridge" | "l2psEncryptedTx" | "storage" | "l2ps_hash_update" | "
|
|
18
|
+
type: "web2Request" | "crosschainOperation" | "subnet" | "native" | "demoswork" | "genesis" | "NODE_ONLINE" | "identity" | "instantMessaging" | "nativeBridge" | "l2psEncryptedTx" | "storage" | "l2ps_hash_update" | "contractDeploy" | "contractCall";
|
|
18
19
|
from: string;
|
|
19
20
|
from_ed25519_address: string;
|
|
20
21
|
to: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../../src/types/blockchain/Transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../../src/types/blockchain/Transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqFA,uCAAuC;AACvC,wDAAqC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Transaction, TransactionContent } from "../Transaction";
|
|
2
|
+
/**
|
|
3
|
+
* Payload for contract method call transactions
|
|
4
|
+
*/
|
|
5
|
+
export interface ContractCallPayload {
|
|
6
|
+
contractAddress: string;
|
|
7
|
+
method: string;
|
|
8
|
+
args: any[];
|
|
9
|
+
value?: bigint;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Transaction content type for contract call operations
|
|
13
|
+
*/
|
|
14
|
+
export type ContractCallTransactionContent = Omit<TransactionContent, 'type' | 'data'> & {
|
|
15
|
+
type: 'contractCall';
|
|
16
|
+
data: ['contractCall', ContractCallPayload];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Complete contract call transaction interface
|
|
20
|
+
*/
|
|
21
|
+
export interface ContractCallTransaction extends Omit<Transaction, 'content'> {
|
|
22
|
+
content: ContractCallTransactionContent;
|
|
23
|
+
}
|
|
24
|
+
export default ContractCallTransaction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContractCallTransaction.js","sourceRoot":"","sources":["../../../../../src/types/blockchain/TransactionSubtypes/ContractCallTransaction.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Transaction, TransactionContent } from "../Transaction";
|
|
2
|
+
/**
|
|
3
|
+
* Contract metadata for deployment
|
|
4
|
+
*/
|
|
5
|
+
export interface ContractMetadata {
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Payload for contract deployment transactions
|
|
12
|
+
*/
|
|
13
|
+
export interface ContractDeployPayload {
|
|
14
|
+
source: string;
|
|
15
|
+
constructorArgs: any[];
|
|
16
|
+
metadata?: ContractMetadata;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Transaction content type for contract deployment operations
|
|
20
|
+
*/
|
|
21
|
+
export type ContractDeployTransactionContent = Omit<TransactionContent, 'type' | 'data'> & {
|
|
22
|
+
type: 'contractDeploy';
|
|
23
|
+
data: ['contractDeploy', ContractDeployPayload];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Complete contract deployment transaction interface
|
|
27
|
+
*/
|
|
28
|
+
export interface ContractDeployTransaction extends Omit<Transaction, 'content'> {
|
|
29
|
+
content: ContractDeployTransactionContent;
|
|
30
|
+
}
|
|
31
|
+
export default ContractDeployTransaction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContractDeployTransaction.js","sourceRoot":"","sources":["../../../../../src/types/blockchain/TransactionSubtypes/ContractDeployTransaction.ts"],"names":[],"mappings":""}
|
|
@@ -8,6 +8,8 @@ export * from './IdentityTransaction';
|
|
|
8
8
|
export * from './InstantMessagingTransaction';
|
|
9
9
|
export * from './NativeBridgeTransaction';
|
|
10
10
|
export * from './StorageTransaction';
|
|
11
|
+
export * from './ContractDeployTransaction';
|
|
12
|
+
export * from './ContractCallTransaction';
|
|
11
13
|
import { L2PSTransaction } from './L2PSTransaction';
|
|
12
14
|
import { L2PSHashTransaction } from './L2PSHashTransaction';
|
|
13
15
|
import { Web2Transaction } from './Web2Transaction';
|
|
@@ -18,4 +20,6 @@ import { IdentityTransaction } from './IdentityTransaction';
|
|
|
18
20
|
import { InstantMessagingTransaction } from './InstantMessagingTransaction';
|
|
19
21
|
import { NativeBridgeTransaction } from './NativeBridgeTransaction';
|
|
20
22
|
import { StorageTransaction } from './StorageTransaction';
|
|
21
|
-
|
|
23
|
+
import { ContractDeployTransaction } from './ContractDeployTransaction';
|
|
24
|
+
import { ContractCallTransaction } from './ContractCallTransaction';
|
|
25
|
+
export type SpecificTransaction = L2PSTransaction | L2PSHashTransaction | Web2Transaction | CrosschainTransaction | NativeTransaction | DemosworkTransaction | IdentityTransaction | InstantMessagingTransaction | NativeBridgeTransaction | StorageTransaction | ContractDeployTransaction | ContractCallTransaction;
|
|
@@ -24,4 +24,6 @@ __exportStar(require("./IdentityTransaction"), exports);
|
|
|
24
24
|
__exportStar(require("./InstantMessagingTransaction"), exports);
|
|
25
25
|
__exportStar(require("./NativeBridgeTransaction"), exports);
|
|
26
26
|
__exportStar(require("./StorageTransaction"), exports);
|
|
27
|
+
__exportStar(require("./ContractDeployTransaction"), exports);
|
|
28
|
+
__exportStar(require("./ContractCallTransaction"), exports);
|
|
27
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/blockchain/TransactionSubtypes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC;AACjC,wDAAqC;AACrC,oDAAiC;AACjC,0DAAuC;AACvC,sDAAmC;AACnC,yDAAsC;AACtC,wDAAqC;AACrC,gEAA6C;AAC7C,4DAAyC;AACzC,uDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/blockchain/TransactionSubtypes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC;AACjC,wDAAqC;AACrC,oDAAiC;AACjC,0DAAuC;AACvC,sDAAmC;AACnC,yDAAsC;AACtC,wDAAqC;AACrC,gEAA6C;AAC7C,4DAAyC;AACzC,uDAAoC;AACpC,8DAA2C;AAC3C,4DAAyC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kynesyslabs/demosdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.20",
|
|
4
4
|
"description": "Demosdk is a JavaScript/TypeScript SDK that provides a unified interface for interacting with Demos network",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SmartContractTransaction.js","sourceRoot":"","sources":["../../../../../src/types/blockchain/TransactionSubtypes/SmartContractTransaction.ts"],"names":[],"mappings":""}
|