@airgap/acurast 0.13.43-beta.3 → 0.13.43-beta.5
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/package.json +5 -5
- package/v1/index.d.ts +2 -1
- package/v1/index.js +3 -1
- package/v1/index.js.map +1 -1
- package/v1/module/AcurastModule.d.ts +1 -1
- package/v1/module/AcurastModule.js +7 -0
- package/v1/module/AcurastModule.js.map +1 -1
- package/v1/protocol/AcurastCanaryProtocol.d.ts +12 -0
- package/v1/protocol/AcurastCanaryProtocol.js +89 -0
- package/v1/protocol/AcurastCanaryProtocol.js.map +1 -0
- package/v1/protocol/AcurastProtocol.js +5 -4
- package/v1/protocol/AcurastProtocol.js.map +1 -1
- package/v1/serializer/v3/serializer-companion.js +16 -6
- package/v1/serializer/v3/serializer-companion.js.map +1 -1
- package/v1/types/protocol.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/acurast",
|
|
3
|
-
"version": "0.13.43-beta.
|
|
3
|
+
"version": "0.13.43-beta.5",
|
|
4
4
|
"description": "The @airgap/acurast is an Acurast implementation of the ICoinProtocol interface from @airgap/coinlib-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
},
|
|
32
32
|
"author": "Papers AG <contact@papers.ch> (https://papers.ch)",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@airgap/coinlib-core": "^0.13.43-beta.
|
|
35
|
-
"@airgap/module-kit": "^0.13.43-beta.
|
|
36
|
-
"@airgap/serializer": "^0.13.43-beta.
|
|
37
|
-
"@airgap/substrate": "^0.13.43-beta.
|
|
34
|
+
"@airgap/coinlib-core": "^0.13.43-beta.5",
|
|
35
|
+
"@airgap/module-kit": "^0.13.43-beta.5",
|
|
36
|
+
"@airgap/serializer": "^0.13.43-beta.5",
|
|
37
|
+
"@airgap/substrate": "^0.13.43-beta.5",
|
|
38
38
|
"@polkadot/util": "2.0.1",
|
|
39
39
|
"@polkadot/wasm-crypto": "0.20.1"
|
|
40
40
|
},
|
package/v1/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AcurastCanaryProtocol, createAcurastCanaryProtocol } from './protocol/AcurastCanaryProtocol';
|
|
1
2
|
import { AcurastModule } from './module/AcurastModule';
|
|
2
3
|
import { AcurastProtocol, createAcurastProtocol } from './protocol/AcurastProtocol';
|
|
3
4
|
import { AcurastProtocolConfiguration } from './types/configuration';
|
|
4
5
|
import { AcurastCryptoConfiguration } from './types/crypto';
|
|
5
6
|
import { AcurastProtocolNetwork, AcurastProtocolOptions, AcurastUnits } from './types/protocol';
|
|
6
7
|
export { AcurastModule };
|
|
7
|
-
export { AcurastProtocol, createAcurastProtocol };
|
|
8
|
+
export { AcurastProtocol, createAcurastProtocol, AcurastCanaryProtocol, createAcurastCanaryProtocol };
|
|
8
9
|
export { AcurastCryptoConfiguration, AcurastUnits, AcurastProtocolNetwork, AcurastProtocolOptions, AcurastProtocolConfiguration };
|
package/v1/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAcurastProtocol = exports.AcurastModule = void 0;
|
|
3
|
+
exports.createAcurastCanaryProtocol = exports.createAcurastProtocol = exports.AcurastModule = void 0;
|
|
4
|
+
var AcurastCanaryProtocol_1 = require("./protocol/AcurastCanaryProtocol");
|
|
5
|
+
Object.defineProperty(exports, "createAcurastCanaryProtocol", { enumerable: true, get: function () { return AcurastCanaryProtocol_1.createAcurastCanaryProtocol; } });
|
|
4
6
|
var AcurastModule_1 = require("./module/AcurastModule");
|
|
5
7
|
Object.defineProperty(exports, "AcurastModule", { enumerable: true, get: function () { return AcurastModule_1.AcurastModule; } });
|
|
6
8
|
var AcurastProtocol_1 = require("./protocol/AcurastProtocol");
|
package/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,wDAAsD;AAQ7C,8FARA,6BAAa,OAQA;AAPtB,8DAAmF;AAWzD,sGAXA,uCAAqB,OAWA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,0EAAqG;AAa7B,4GAbxC,mDAA2B,OAawC;AAZnG,wDAAsD;AAQ7C,8FARA,6BAAa,OAQA;AAPtB,8DAAmF;AAWzD,sGAXA,uCAAqB,OAWA"}
|
|
@@ -3,7 +3,7 @@ import { AirGapModule, AirGapV3SerializerCompanion, ProtocolConfiguration } from
|
|
|
3
3
|
import { BlockExplorer } from '@airgap/module-kit/block-explorer/block-explorer';
|
|
4
4
|
import { OfflineProtocol, OnlineProtocol } from '@airgap/module-kit/protocol/protocol';
|
|
5
5
|
import { AcurastProtocolNetwork } from '../types/protocol';
|
|
6
|
-
declare type SupportedProtocols = MainProtocolSymbols.ACURAST;
|
|
6
|
+
declare type SupportedProtocols = MainProtocolSymbols.ACURAST | MainProtocolSymbols.ACURAST_CANARY;
|
|
7
7
|
export declare class AcurastModule implements AirGapModule<{
|
|
8
8
|
Protocols: SupportedProtocols;
|
|
9
9
|
ProtocolNetwork: AcurastProtocolNetwork;
|
|
@@ -43,6 +43,7 @@ var module_kit_1 = require("@airgap/module-kit");
|
|
|
43
43
|
var substrate_1 = require("@airgap/substrate");
|
|
44
44
|
var AcurastProtocol_1 = require("../protocol/AcurastProtocol");
|
|
45
45
|
var serializer_companion_1 = require("../serializer/v3/serializer-companion");
|
|
46
|
+
var AcurastCanaryProtocol_1 = require("../protocol/AcurastCanaryProtocol");
|
|
46
47
|
var AcurastModule = /** @class */ (function () {
|
|
47
48
|
function AcurastModule() {
|
|
48
49
|
var _a;
|
|
@@ -50,6 +51,9 @@ var AcurastModule = /** @class */ (function () {
|
|
|
50
51
|
_a[coinlib_core_1.MainProtocolSymbols.ACURAST] = new module_kit_1.ModuleNetworkRegistry({
|
|
51
52
|
supportedNetworks: [AcurastProtocol_1.ACURAST_MAINNET_PROTOCOL_NETWORK]
|
|
52
53
|
}),
|
|
54
|
+
_a[coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY] = new module_kit_1.ModuleNetworkRegistry({
|
|
55
|
+
supportedNetworks: [AcurastCanaryProtocol_1.ACURAST_CANARY_PROTOCOL_NETWORK]
|
|
56
|
+
}),
|
|
53
57
|
_a);
|
|
54
58
|
this.supportedProtocols = (0, module_kit_1.createSupportedProtocols)(this.networkRegistries);
|
|
55
59
|
}
|
|
@@ -97,6 +101,9 @@ var AcurastModule = /** @class */ (function () {
|
|
|
97
101
|
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
98
102
|
return (0, AcurastProtocol_1.createAcurastProtocol)({ network: network });
|
|
99
103
|
}
|
|
104
|
+
else if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY) {
|
|
105
|
+
return (0, AcurastCanaryProtocol_1.createAcurastCanaryProtocol)({ network: network });
|
|
106
|
+
}
|
|
100
107
|
else {
|
|
101
108
|
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported. (Acurast)"));
|
|
102
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcurastModule.js","sourceRoot":"","sources":["../../../src/v1/module/AcurastModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;AACrE,iDAO2B;AAG3B,+CAAwD;AAExD,+DAAqG;AACrG,8EAAoF;
|
|
1
|
+
{"version":3,"file":"AcurastModule.js","sourceRoot":"","sources":["../../../src/v1/module/AcurastModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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S,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,SAAS,EAAE,sDAAsD,CAAC,CAAA;iBAC5G;gBAED,sBAAO,IAAI,gCAAoB,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAA;;;KAC1D;IAEY,mDAA2B,GAAxC;;;gBACE,sBAAO,IAAI,mDAA4B,EAAE,EAAA;;;KAC1C;IAEO,sCAAc,GAAtB,UAAuB,UAA8B,EAAE,OAAyB;QAC9E,IAAI,UAAU,KAAK,kCAAmB,CAAC,OAAO,EAAE;YAC9C,OAAO,IAAA,uCAAqB,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;SAC1C;aAAM,IAAI,UAAU,KAAK,kCAAmB,CAAC,cAAc,EAAE;YAC5D,OAAO,IAAA,mDAA2B,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;SAChD;aAAM;YACL,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,SAAS,EAAE,mBAAY,UAAU,8BAA2B,CAAC,CAAA;SACvG;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAxDD,IAwDC;AAxDY,sCAAa"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProtocolMetadata, RecursivePartial } from '@airgap/module-kit';
|
|
2
|
+
import { AcurastCanaryUnits, AcurastProtocolNetwork, AcurastProtocolOptions } from '../types/protocol';
|
|
3
|
+
import { AcurastBaseProtocol, AcurastBaseProtocolImpl } from './AcurastBaseProtocol';
|
|
4
|
+
export interface AcurastCanaryProtocol extends AcurastBaseProtocol<AcurastCanaryUnits> {
|
|
5
|
+
}
|
|
6
|
+
export declare const ACURAST_CANARY_METADATA: ProtocolMetadata<AcurastCanaryUnits>;
|
|
7
|
+
export declare class AcurastCanaryProtocolImpl extends AcurastBaseProtocolImpl<AcurastCanaryUnits> implements AcurastCanaryProtocol {
|
|
8
|
+
constructor(options?: RecursivePartial<AcurastProtocolOptions>);
|
|
9
|
+
}
|
|
10
|
+
export declare function createAcurastCanaryProtocol(options?: RecursivePartial<AcurastProtocolOptions>): AcurastCanaryProtocol;
|
|
11
|
+
export declare const ACURAST_CANARY_PROTOCOL_NETWORK: AcurastProtocolNetwork;
|
|
12
|
+
export declare function createAcurastCanaryProtocolOptions(network?: Partial<AcurastProtocolNetwork>): AcurastProtocolOptions;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.createAcurastCanaryProtocolOptions = exports.ACURAST_CANARY_PROTOCOL_NETWORK = exports.createAcurastCanaryProtocol = exports.AcurastCanaryProtocolImpl = exports.ACURAST_CANARY_METADATA = void 0;
|
|
30
|
+
var coinlib_core_1 = require("@airgap/coinlib-core");
|
|
31
|
+
var AcurastBaseProtocol_1 = require("./AcurastBaseProtocol");
|
|
32
|
+
var AcurastProtocol_1 = require("./AcurastProtocol");
|
|
33
|
+
// Implementation
|
|
34
|
+
exports.ACURAST_CANARY_METADATA = {
|
|
35
|
+
identifier: coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY,
|
|
36
|
+
name: 'Acurast Canary',
|
|
37
|
+
units: {
|
|
38
|
+
cACU: {
|
|
39
|
+
symbol: { value: 'cACU' },
|
|
40
|
+
decimals: 12
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
mainUnit: 'cACU',
|
|
44
|
+
account: {
|
|
45
|
+
standardDerivationPath: "m/44'/434'/0'/0/0",
|
|
46
|
+
address: {
|
|
47
|
+
isCaseSensitive: true,
|
|
48
|
+
placeholder: "5ABC...",
|
|
49
|
+
regex: '^5[a-km-zA-HJ-NP-Z1-9]+$'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var AcurastCanaryProtocolImpl = /** @class */ (function (_super) {
|
|
54
|
+
__extends(AcurastCanaryProtocolImpl, _super);
|
|
55
|
+
function AcurastCanaryProtocolImpl(options) {
|
|
56
|
+
if (options === void 0) { options = {}; }
|
|
57
|
+
var completeOptions = createAcurastCanaryProtocolOptions(options.network);
|
|
58
|
+
var metadata = exports.ACURAST_CANARY_METADATA;
|
|
59
|
+
var configuration = AcurastProtocol_1.ACURAST_CONFIGURATION;
|
|
60
|
+
return _super.call(this, { metadata: metadata, configuration: configuration, network: completeOptions.network }) || this;
|
|
61
|
+
}
|
|
62
|
+
return AcurastCanaryProtocolImpl;
|
|
63
|
+
}(AcurastBaseProtocol_1.AcurastBaseProtocolImpl));
|
|
64
|
+
exports.AcurastCanaryProtocolImpl = AcurastCanaryProtocolImpl;
|
|
65
|
+
// Factory
|
|
66
|
+
function createAcurastCanaryProtocol(options) {
|
|
67
|
+
if (options === void 0) { options = {}; }
|
|
68
|
+
return new AcurastCanaryProtocolImpl(options);
|
|
69
|
+
}
|
|
70
|
+
exports.createAcurastCanaryProtocol = createAcurastCanaryProtocol;
|
|
71
|
+
exports.ACURAST_CANARY_PROTOCOL_NETWORK = {
|
|
72
|
+
name: 'Mainnet',
|
|
73
|
+
type: 'mainnet',
|
|
74
|
+
rpcUrl: 'https://acurast-devnet-ws.prod.gke.papers.tech',
|
|
75
|
+
// rpcUrl: 'https://acurast-canarynet-node.prod.gke.acurast.com',
|
|
76
|
+
// rpcUrl: 'https://rpc.collator-1.acurast.papers.tech', //testnet
|
|
77
|
+
blockExplorerUrl: 'https://polkadot.js.org/apps/?rpc=wss://acurast-canarynet-ws.prod.gke.papers.tech#/explorer',
|
|
78
|
+
// blockExplorerUrl: 'https://polkadot.js.org/apps/?rpc=wss.collator-1.acurast.papers.tech#/explorer',
|
|
79
|
+
blockExplorerApi: ''
|
|
80
|
+
};
|
|
81
|
+
var DEFAULT_ACURAST_PROTOCOL_NETWORK = exports.ACURAST_CANARY_PROTOCOL_NETWORK;
|
|
82
|
+
function createAcurastCanaryProtocolOptions(network) {
|
|
83
|
+
if (network === void 0) { network = {}; }
|
|
84
|
+
return {
|
|
85
|
+
network: __assign(__assign({}, DEFAULT_ACURAST_PROTOCOL_NETWORK), network)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
exports.createAcurastCanaryProtocolOptions = createAcurastCanaryProtocolOptions;
|
|
89
|
+
//# sourceMappingURL=AcurastCanaryProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcurastCanaryProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/AcurastCanaryProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA0D;AAK1D,6DAAoF;AACpF,qDAAyD;AAKzD,iBAAiB;AAEJ,QAAA,uBAAuB,GAAyC;IAC3E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IAC9F,OAAO;QACL,OAAO,wBAAO,gCAAgC,GAAK,OAAO,CAAE;KAC7D,CAAA;AACH,CAAC;AAJD,gFAIC"}
|
|
@@ -34,12 +34,12 @@ exports.ACURAST_METADATA = {
|
|
|
34
34
|
identifier: coinlib_core_1.MainProtocolSymbols.ACURAST,
|
|
35
35
|
name: 'Acurast',
|
|
36
36
|
units: {
|
|
37
|
-
|
|
38
|
-
symbol: { value: '
|
|
37
|
+
ACU: {
|
|
38
|
+
symbol: { value: 'ACU' },
|
|
39
39
|
decimals: 12
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
mainUnit: '
|
|
42
|
+
mainUnit: 'ACU',
|
|
43
43
|
account: {
|
|
44
44
|
standardDerivationPath: "m/44'/434'/0'/0/0",
|
|
45
45
|
address: {
|
|
@@ -80,7 +80,8 @@ exports.createAcurastProtocol = createAcurastProtocol;
|
|
|
80
80
|
exports.ACURAST_MAINNET_PROTOCOL_NETWORK = {
|
|
81
81
|
name: 'Mainnet',
|
|
82
82
|
type: 'mainnet',
|
|
83
|
-
rpcUrl: 'https://acurast-
|
|
83
|
+
rpcUrl: 'https://acurast-devnet-ws.prod.gke.papers.tech',
|
|
84
|
+
// rpcUrl: 'https://acurast-canarynet-node.prod.gke.acurast.com',
|
|
84
85
|
// rpcUrl: 'https://rpc.collator-1.acurast.papers.tech', //testnet
|
|
85
86
|
blockExplorerUrl: 'https://polkadot.js.org/apps/?rpc=wss://acurast-canarynet-ws.prod.gke.papers.tech#/explorer',
|
|
86
87
|
// blockExplorerUrl: 'https://polkadot.js.org/apps/?rpc=wss.collator-1.acurast.papers.tech#/explorer',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcurastProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/AcurastProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA0D;AAK1D,6DAAoF;AAKpF,iBAAiB;AAEJ,QAAA,gBAAgB,G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AAmB;AAWhC,UAAU;AAEV,SAAgB,qBAAqB,CAAC,OAAsD;IAAtD,wBAAA,EAAA,YAAsD;IAC1F,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAA;AACzC,CAAC;AAFD,sDAEC;AAEY,QAAA,gCAAgC,GAA2B;IACtE,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,gDAAgD;IACxD,iEAAiE;IACjE,kEAAkE;IAClE,gBAAgB,EAAE,6FAA6F;IAC/G,sGAAsG;IACtG,gBAAgB,EAAE,EAAE;CACrB,CAAA;AAED,IAAM,gCAAgC,GAA2B,wCAAgC,CAAA;AAEjG,SAAgB,4BAA4B,CAAC,OAA6C;IAA7C,wBAAA,EAAA,YAA6C;IACxF,OAAO;QACL,OAAO,wBAAO,gCAAgC,GAAK,OAAO,CAAE;KAC7D,CAAA;AACH,CAAC;AAJD,oEAIC"}
|
|
@@ -58,6 +58,16 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
58
58
|
type: serializer_1.IACMessageType.TransactionSignResponse,
|
|
59
59
|
schema: { schema: acurastTransactionSignResponse },
|
|
60
60
|
protocolIdentifier: coinlib_core_1.MainProtocolSymbols.ACURAST
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: serializer_1.IACMessageType.TransactionSignRequest,
|
|
64
|
+
schema: { schema: acurastTransactionSignRequest },
|
|
65
|
+
protocolIdentifier: coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: serializer_1.IACMessageType.TransactionSignResponse,
|
|
69
|
+
schema: { schema: acurastTransactionSignResponse },
|
|
70
|
+
protocolIdentifier: coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY
|
|
61
71
|
}
|
|
62
72
|
];
|
|
63
73
|
this.acurastTransactionValidator = new transaction_validator_1.AcurastTransactionValidator();
|
|
@@ -68,7 +78,7 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
68
78
|
AcurastV3SerializerCompanion.prototype.toTransactionSignRequest = function (identifier, unsignedTransaction, publicKey, callbackUrl) {
|
|
69
79
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
80
|
return __generator(this, function (_a) {
|
|
71
|
-
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
81
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST || identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY) {
|
|
72
82
|
return [2 /*return*/, (0, transaction_converter_1.acurastUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl)];
|
|
73
83
|
}
|
|
74
84
|
else {
|
|
@@ -81,7 +91,7 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
81
91
|
AcurastV3SerializerCompanion.prototype.fromTransactionSignRequest = function (identifier, transactionSignRequest) {
|
|
82
92
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
93
|
return __generator(this, function (_a) {
|
|
84
|
-
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
94
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST || identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY) {
|
|
85
95
|
return [2 /*return*/, (0, transaction_converter_1.acurastTransactionSignRequestToUnsigned)(transactionSignRequest)];
|
|
86
96
|
}
|
|
87
97
|
else {
|
|
@@ -97,7 +107,7 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
97
107
|
return __generator(this, function (_b) {
|
|
98
108
|
switch (_b.label) {
|
|
99
109
|
case 0:
|
|
100
|
-
if (!(identifier === coinlib_core_1.MainProtocolSymbols.ACURAST)) return [3 /*break*/, 5];
|
|
110
|
+
if (!(identifier === coinlib_core_1.MainProtocolSymbols.ACURAST || identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY)) return [3 /*break*/, 5];
|
|
101
111
|
_b.label = 1;
|
|
102
112
|
case 1:
|
|
103
113
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -118,7 +128,7 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
118
128
|
AcurastV3SerializerCompanion.prototype.toTransactionSignResponse = function (identifier, signedTransaction, accountIdentifier) {
|
|
119
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
120
130
|
return __generator(this, function (_a) {
|
|
121
|
-
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
131
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST || identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY) {
|
|
122
132
|
return [2 /*return*/, (0, transaction_converter_1.acurastSignedTransactionToResponse)(signedTransaction, accountIdentifier)];
|
|
123
133
|
}
|
|
124
134
|
else {
|
|
@@ -131,7 +141,7 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
131
141
|
AcurastV3SerializerCompanion.prototype.fromTransactionSignResponse = function (identifier, transactionSignResponse) {
|
|
132
142
|
return __awaiter(this, void 0, void 0, function () {
|
|
133
143
|
return __generator(this, function (_a) {
|
|
134
|
-
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
144
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST || identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY) {
|
|
135
145
|
return [2 /*return*/, (0, transaction_converter_1.acurastTransactionSignResponseToSigned)(transactionSignResponse)];
|
|
136
146
|
}
|
|
137
147
|
else {
|
|
@@ -147,7 +157,7 @@ var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
|
147
157
|
return __generator(this, function (_b) {
|
|
148
158
|
switch (_b.label) {
|
|
149
159
|
case 0:
|
|
150
|
-
if (!(identifier === coinlib_core_1.MainProtocolSymbols.ACURAST)) return [3 /*break*/, 5];
|
|
160
|
+
if (!(identifier === coinlib_core_1.MainProtocolSymbols.ACURAST || identifier === coinlib_core_1.MainProtocolSymbols.ACURAST_CANARY)) return [3 /*break*/, 5];
|
|
151
161
|
_b.label = 1;
|
|
152
162
|
case 1:
|
|
153
163
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,8FAA8F;AAC9F,sDAA8D;AAG9D,iDAAgH;AAGhH,mFAKkD;AAClD,4EAAgF;AAChF,sDAA2D;AAE3D,IAAM,6BAA6B,GAAe,OAAO,CAAC,2DAA2D,CAAC,CAAA;AACtH,IAAM,8BAA8B,GAAe,OAAO,CAAC,4DAA4D,CAAC,CAAA;AAExH;
|
|
1
|
+
{"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,8FAA8F;AAC9F,sDAA8D;AAG9D,iDAAgH;AAGhH,mFAKkD;AAClD,4EAAgF;AAChF,sDAA2D;AAE3D,IAAM,6BAA6B,GAAe,OAAO,CAAC,2DAA2D,CAAC,CAAA;AACtH,IAAM,8BAA8B,GAAe,OAAO,CAAC,4DAA4D,CAAC,CAAA;AAExH;IA0BE;QAzBgB,YAAO,GAA4B;YACjD;gBACE,IAAI,EAAE,2BAAc,CAAC,sBAAsB;gBAC3C,MAAM,EAAE,EAAE,MAAM,EAAE,6BAA6B,EAAE;gBACjD,kBAAkB,EAAE,kCAAmB,CAAC,OAAO;aAChD;YACD;gBACE,IAAI,EAAE,2BAAc,CAAC,uBAAuB;gBAC5C,MAAM,EAAE,EAAE,MAAM,EAAE,8BAA8B,EAAE;gBAClD,kBAAkB,EAAE,kCAAmB,CAAC,OAAO;aAChD;YACD;gBACE,IAAI,EAAE,2BAAc,CAAC,sBAAsB;g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AC,2BAA2B,CAAC,yBAAyB,CAAC,uBAAuB,CAAC,EAAA;;wBAAzF,SAAyF,CAAA;wBAEzF,sBAAO,IAAI,EAAA;;;wBAEX,sBAAO,KAAK,EAAA;;4BAGd,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,SAAS,EAAE,mBAAY,UAAU,mBAAgB,CAAC,CAAA;;;;;KAEvF;IACH,mCAAC;AAAD,CAAC,AA1GD,IA0GC;AA1GY,oEAA4B"}
|
package/v1/types/protocol.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SubstrateProtocolNetwork, SubstrateProtocolOptions } from '@airgap/substrate/v1';
|
|
2
2
|
import { AcurastProtocolConfiguration } from './configuration';
|
|
3
|
-
export declare type AcurastUnits = '
|
|
3
|
+
export declare type AcurastUnits = 'ACU';
|
|
4
|
+
export declare type AcurastCanaryUnits = 'cACU';
|
|
4
5
|
export interface AcurastProtocolNetwork extends SubstrateProtocolNetwork {
|
|
5
6
|
blockExplorerApi: string;
|
|
6
7
|
}
|