@airgap/tezos 0.13.7-beta.27 → 0.13.8-beta.10
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/airgap-coinlib-tezos.min.js +19 -2
- package/package.json +5 -5
- package/v0/protocol/TezosAddress.js +1 -0
- package/v0/protocol/TezosAddress.js.map +1 -1
- package/v0/protocol/TezosCryptoClient.js +2 -0
- package/v0/protocol/TezosCryptoClient.js.map +1 -1
- package/v0/protocol/TezosProtocol.js +2 -0
- package/v0/protocol/TezosProtocol.js.map +1 -1
- package/v0/protocol/TezosUtils.js +1 -0
- package/v0/protocol/TezosUtils.js.map +1 -1
- package/v0/protocol/domains/TezosDomains.js +1 -0
- package/v0/protocol/domains/TezosDomains.js.map +1 -1
- package/v0/protocol/kt/TezosKtProtocol.js +1 -1
- package/v0/protocol/kt/TezosKtProtocol.js.map +1 -1
- package/v0/protocol/sapling/TezosSaplingAddress.js +1 -0
- package/v0/protocol/sapling/TezosSaplingAddress.js.map +1 -1
- package/v0/protocol/sapling/TezosSaplingProtocol.js +1 -0
- package/v0/protocol/sapling/TezosSaplingProtocol.js.map +1 -1
- package/v0/protocol/sapling/TezosShieldedTezProtocol.js +3 -1
- package/v0/protocol/sapling/TezosShieldedTezProtocol.js.map +1 -1
- package/v0/protocol/types/michelson/MichelsonTypeMeta.js.map +1 -1
- package/v0/serializer/validators/transaction-validator.js.map +1 -1
- package/v0/serializer/validators/transaction-xtz-btc-validator.js.map +1 -1
- package/v1/crypto/TezosCryptoClient.js +1 -0
- package/v1/crypto/TezosCryptoClient.js.map +1 -1
- package/v1/index.d.ts +1 -2
- package/v1/index.js +1 -3
- package/v1/index.js.map +1 -1
- package/v1/module/TezosModule.d.ts +9 -6
- package/v1/module/TezosModule.js +126 -10
- package/v1/module/TezosModule.js.map +1 -1
- package/v1/protocol/TezosProtocol.js +1 -0
- package/v1/protocol/TezosProtocol.js.map +1 -1
- package/v1/protocol/fa/TezosFAProtocol.d.ts +3 -2
- package/v1/protocol/fa/TezosFAProtocol.js +21 -11
- package/v1/protocol/fa/TezosFAProtocol.js.map +1 -1
- package/v1/protocol/kt/TezosKtProtocol.js +8 -1
- package/v1/protocol/kt/TezosKtProtocol.js.map +1 -1
- package/v1/protocol/sapling/TezosSaplingProtocol.js +6 -2
- package/v1/protocol/sapling/TezosSaplingProtocol.js.map +1 -1
- package/v1/protocol/sapling/TezosShieldedTezProtocol.d.ts +0 -2
- package/v1/protocol/sapling/TezosShieldedTezProtocol.js +6 -6
- package/v1/protocol/sapling/TezosShieldedTezProtocol.js.map +1 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +26 -4
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-tezos-sapling.d.ts +1 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-tezos.d.ts +5 -1
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-tezos-sapling.json +29 -36
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-tezos.json +8 -15
- package/v1/serializer/v3/serializer-companion.d.ts +15 -0
- package/v1/serializer/v3/serializer-companion.js +521 -0
- package/v1/serializer/v3/serializer-companion.js.map +1 -0
- package/v1/serializer/v3/validators/transaction-validator.d.ts +1 -7
- package/v1/serializer/v3/validators/transaction-validator.js +2 -20
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
- package/v1/types/michelson/MichelsonTypeMeta.js.map +1 -1
- package/v1/utils/bip.js +1 -0
- package/v1/utils/bip.js.map +1 -1
- package/v1/utils/encoding.js +1 -0
- package/v1/utils/encoding.js.map +1 -1
- package/v1/utils/protocol/tezos/TezosAccountant.js +9 -5
- package/v1/utils/protocol/tezos/TezosAccountant.js.map +1 -1
- package/v1/module/TezosKtModule.d.ts +0 -8
- package/v1/module/TezosKtModule.js +0 -87
- package/v1/module/TezosKtModule.js.map +0 -1
- package/v1/module/TezosShieldedTezModule.d.ts +0 -8
- package/v1/module/TezosShieldedTezModule.js +0 -86
- package/v1/module/TezosShieldedTezModule.js.map +0 -1
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.tezosSaplingTransactionSignResponseToSigned = exports.tezosSaplingTransactionSignRequestToUnsigned = exports.tezosSaplingSignedTransactionToResponse = exports.tezosSaplingUnsignedTransactionToRequest = exports.tezosTransactionSignResponseToSigned = exports.tezosTransactionSignRequestToUnsigned = exports.tezosSignedTransactionToResponse = exports.tezosUnsignedTransactionToRequest = void 0;
|
|
4
15
|
var module_kit_1 = require("@airgap/module-kit");
|
|
5
16
|
function tezosUnsignedTransactionToRequest(unsigned, publicKey, callbackUrl) {
|
|
6
|
-
return {
|
|
17
|
+
return {
|
|
18
|
+
transaction: {
|
|
19
|
+
binaryTransaction: unsigned.binary
|
|
20
|
+
},
|
|
21
|
+
publicKey: publicKey,
|
|
22
|
+
callbackURL: callbackUrl
|
|
23
|
+
};
|
|
7
24
|
}
|
|
8
25
|
exports.tezosUnsignedTransactionToRequest = tezosUnsignedTransactionToRequest;
|
|
9
26
|
function tezosSignedTransactionToResponse(signed, accountIdentifier) {
|
|
@@ -11,7 +28,7 @@ function tezosSignedTransactionToResponse(signed, accountIdentifier) {
|
|
|
11
28
|
}
|
|
12
29
|
exports.tezosSignedTransactionToResponse = tezosSignedTransactionToResponse;
|
|
13
30
|
function tezosTransactionSignRequestToUnsigned(request) {
|
|
14
|
-
return request.transaction;
|
|
31
|
+
return (0, module_kit_1.newUnsignedTransaction)({ binary: request.transaction.binaryTransaction });
|
|
15
32
|
}
|
|
16
33
|
exports.tezosTransactionSignRequestToUnsigned = tezosTransactionSignRequestToUnsigned;
|
|
17
34
|
function tezosTransactionSignResponseToSigned(response) {
|
|
@@ -19,7 +36,12 @@ function tezosTransactionSignResponseToSigned(response) {
|
|
|
19
36
|
}
|
|
20
37
|
exports.tezosTransactionSignResponseToSigned = tezosTransactionSignResponseToSigned;
|
|
21
38
|
function tezosSaplingUnsignedTransactionToRequest(unsigned, publicKey, callbackUrl) {
|
|
22
|
-
|
|
39
|
+
var _ = unsigned.type, rest = __rest(unsigned, ["type"]);
|
|
40
|
+
return {
|
|
41
|
+
transaction: rest,
|
|
42
|
+
publicKey: publicKey,
|
|
43
|
+
callbackURL: callbackUrl
|
|
44
|
+
};
|
|
23
45
|
}
|
|
24
46
|
exports.tezosSaplingUnsignedTransactionToRequest = tezosSaplingUnsignedTransactionToRequest;
|
|
25
47
|
function tezosSaplingSignedTransactionToResponse(signed, accountIdentifier) {
|
|
@@ -27,7 +49,7 @@ function tezosSaplingSignedTransactionToResponse(signed, accountIdentifier) {
|
|
|
27
49
|
}
|
|
28
50
|
exports.tezosSaplingSignedTransactionToResponse = tezosSaplingSignedTransactionToResponse;
|
|
29
51
|
function tezosSaplingTransactionSignRequestToUnsigned(request) {
|
|
30
|
-
return request.transaction;
|
|
52
|
+
return (0, module_kit_1.newUnsignedTransaction)(request.transaction);
|
|
31
53
|
}
|
|
32
54
|
exports.tezosSaplingTransactionSignRequestToUnsigned = tezosSaplingTransactionSignRequestToUnsigned;
|
|
33
55
|
function tezosSaplingTransactionSignResponseToSigned(response) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-converter.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/converter/transaction-converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transaction-converter.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/converter/transaction-converter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iDAAiF;AAajF,SAAgB,iCAAiC,CAC/C,QAAkC,EAClC,SAAiB,EACjB,WAAoB;IAEpB,OAAO;QACL,WAAW,EAAE;YACX,iBAAiB,EAAE,QAAQ,CAAC,MAAM;SACnC;QACD,SAAS,WAAA;QACT,WAAW,EAAE,WAAW;KACzB,CAAA;AACH,CAAC;AAZD,8EAYC;AAED,SAAgB,gCAAgC,CAAC,MAA8B,EAAE,iBAAyB;IACxG,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,mBAAA,EAAE,CAAA;AAC1D,CAAC;AAFD,4EAEC;AAED,SAAgB,qCAAqC,CAAC,OAAoC;IACxF,OAAO,IAAA,mCAAsB,EAA2B,EAAE,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAA;AAC5G,CAAC;AAFD,sFAEC;AAED,SAAgB,oCAAoC,CAAC,QAAsC;IACzF,OAAO,IAAA,iCAAoB,EAAyB,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;AACvF,CAAC;AAFD,oFAEC;AAED,SAAgB,wCAAwC,CACtD,QAAyC,EACzC,SAAiB,EACjB,WAAoB;IAEZ,IAAM,CAAC,GAAc,QAAQ,KAAtB,EAAK,IAAI,UAAK,QAAQ,EAA/B,QAAoB,CAAF,CAAa;IAErC,OAAO;QACL,WAAW,EAAE,IAAI;QACjB,SAAS,WAAA;QACT,WAAW,EAAE,WAAW;KACzB,CAAA;AACH,CAAC;AAZD,4FAYC;AAED,SAAgB,uCAAuC,CACrD,MAAqC,EACrC,iBAAyB;IAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,mBAAA,EAAE,CAAA;AAC1D,CAAC;AALD,0FAKC;AAED,SAAgB,4CAA4C,CAAC,OAA2C;IACtG,OAAO,IAAA,mCAAsB,EAAkC,OAAO,CAAC,WAAW,CAAC,CAAA;AACrF,CAAC;AAFD,oGAEC;AAED,SAAgB,2CAA2C,CAAC,QAA6C;IACvG,OAAO,IAAA,iCAAoB,EAAgC,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;AAC9F,CAAC;AAFD,kGAEC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TransactionSignRequest } from '@airgap/serializer';
|
|
2
2
|
import { TezosSaplingUnsignedTransaction } from '../../../../types/transaction';
|
|
3
|
-
export interface TezosSaplingTransactionSignRequest extends TransactionSignRequest<TezosSaplingUnsignedTransaction
|
|
3
|
+
export interface TezosSaplingTransactionSignRequest extends TransactionSignRequest<Omit<TezosSaplingUnsignedTransaction, 'type'>> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { TransactionSignRequest } from '@airgap/serializer';
|
|
2
2
|
import { TezosUnsignedTransaction } from '../../../../types/transaction';
|
|
3
|
-
|
|
3
|
+
interface SerializableTezosUnsignedTransaction {
|
|
4
|
+
binaryTransaction: TezosUnsignedTransaction['binary'];
|
|
4
5
|
}
|
|
6
|
+
export interface TezosTransactionSignRequest extends TransactionSignRequest<SerializableTezosUnsignedTransaction> {
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -107,45 +107,38 @@
|
|
|
107
107
|
"type": "string"
|
|
108
108
|
},
|
|
109
109
|
"transaction": {
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"properties": {
|
|
112
|
+
"chainId": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"contractAddress": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"ins": {
|
|
119
|
+
"items": {
|
|
120
|
+
"$ref": "#/definitions/TezosSaplingInput"
|
|
121
|
+
},
|
|
122
|
+
"type": "array"
|
|
123
|
+
},
|
|
124
|
+
"outs": {
|
|
125
|
+
"items": {
|
|
126
|
+
"$ref": "#/definitions/TezosSaplingOutput"
|
|
127
|
+
},
|
|
128
|
+
"type": "array"
|
|
129
|
+
},
|
|
130
|
+
"stateDiff": {
|
|
131
|
+
"$ref": "#/definitions/TezosSaplingStateDiff"
|
|
132
|
+
},
|
|
133
|
+
"unshieldTarget": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
}
|
|
134
136
|
},
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
"stateDiff": {
|
|
138
|
-
"$ref": "#/definitions/TezosSaplingStateDiff"
|
|
139
|
-
},
|
|
140
|
-
"type": {
|
|
141
|
-
"enum": ["unsigned"],
|
|
142
|
-
"type": "string"
|
|
143
|
-
},
|
|
144
|
-
"unshieldTarget": {
|
|
145
|
-
"type": "string"
|
|
137
|
+
"required": ["ins", "outs", "contractAddress", "chainId", "stateDiff", "unshieldTarget"],
|
|
138
|
+
"type": "object"
|
|
146
139
|
}
|
|
147
140
|
},
|
|
148
|
-
"required": ["
|
|
141
|
+
"required": ["publicKey", "transaction"],
|
|
149
142
|
"type": "object"
|
|
150
143
|
}
|
|
151
144
|
}
|
|
@@ -12,25 +12,18 @@
|
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
14
|
"transaction": {
|
|
15
|
-
"
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"binaryTransaction": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["binaryTransaction"],
|
|
22
|
+
"type": "object"
|
|
16
23
|
}
|
|
17
24
|
},
|
|
18
25
|
"required": ["publicKey", "transaction"],
|
|
19
26
|
"type": "object"
|
|
20
|
-
},
|
|
21
|
-
"TezosUnsignedTransaction": {
|
|
22
|
-
"additionalProperties": false,
|
|
23
|
-
"properties": {
|
|
24
|
-
"binary": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"type": {
|
|
28
|
-
"enum": ["unsigned"],
|
|
29
|
-
"type": "string"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"required": ["binary", "type"],
|
|
33
|
-
"type": "object"
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
29
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AirGapV3SerializerCompanion, SignedTransaction, UnsignedTransaction } from '@airgap/module-kit';
|
|
2
|
+
import { V3SchemaConfiguration } from '@airgap/module-kit/types/serializer';
|
|
3
|
+
import { TransactionSignRequest, TransactionSignResponse } from '@airgap/serializer';
|
|
4
|
+
export declare class TezosV3SerializerCompanion implements AirGapV3SerializerCompanion {
|
|
5
|
+
readonly schemas: V3SchemaConfiguration[];
|
|
6
|
+
private readonly tezosTransactionValidator;
|
|
7
|
+
private readonly tezoszBTCTransactionValidator;
|
|
8
|
+
constructor();
|
|
9
|
+
toTransactionSignRequest(identifier: string, unsignedTransaction: UnsignedTransaction, publicKey: string, callbackUrl?: string): Promise<TransactionSignRequest>;
|
|
10
|
+
fromTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<UnsignedTransaction>;
|
|
11
|
+
validateTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<boolean>;
|
|
12
|
+
toTransactionSignResponse(identifier: string, signedTransaction: SignedTransaction, accountIdentifier: string): Promise<TransactionSignResponse>;
|
|
13
|
+
fromTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<SignedTransaction>;
|
|
14
|
+
validateTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<boolean>;
|
|
15
|
+
}
|